我已创建一个新的导航抽屉活动的Android应用程序。 当我执行应用程序时,右上角的图标显示后退箭头,但它必须是3行的图标。导航右上角的抽屉图标显示后退箭头图标insted汉堡图标
图标R.drawable.ic_drawer是本
在NavigationDrawerFragment类。
// ActionBarDrawerToggle ties together the the proper interactions
// between the navigation drawer and the action bar app icon.
mDrawerToggle = new ActionBarDrawerToggle(
getActivity(), /* host Activity */
mDrawerLayout, /* DrawerLayout object */
R.drawable.ic_drawer, /* nav drawer image to replace 'Up' caret */
R.string.navigation_drawer_open, /* "open drawer" description for accessibility */
R.string.navigation_drawer_close /* "close drawer" description for accessibility */
)
当我执行应用程序,我得到右侧的箭头图标。
选择后也图标是一样的。
我现在该如何改变呢?
当您从列表中选择任何项目时,它将变回汉堡包。 –
它是'android.support.v4.app.ActionBarDrawerToggle'还是'android.support.v7.app.ActionBarDrawerToggle'?第一个被弃用。否则,对我来说,这似乎是正常的行为,因为它关闭时会恢复到原来的形状。 – shkschneider
这是一个适当的状态,抽屉是开放的。关闭它(通过选择一个项目),看看它是否改变为汉堡。此外,我认为它是'左上角'而不是'右上角' – Skynet