【发布时间】:2015-05-06 08:23:41
【问题描述】:
我已经使用 Navigation Drawer Activity 创建了一个新的 android 应用程序。 当我执行应用程序时,右上角的图标显示后箭头,但它必须是 3 行的图标。
图标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?第一个被弃用了。否则它对我来说似乎是正常的行为,因为它会在关闭时恢复到原来的形状。 -
这是一个正常的状态,抽屉是打开的。关闭它(通过选择一个项目),看看它是否变为汉堡包。我也认为是
Top Left而不是Top Right -
它是android.support.v7.app.ActionBarActivity;选择后它也将是相同的箭头图标。
-
选择后用图片更新了我的问题。