问题描述
所以我在努力增加ActionBarSherlock和抽屉式导航至previously实现了自定义项目(写得很糟糕)操作栏。而不是使用片段和导航活动backstack,有些活动显示和隐藏不同的布局。 (也就是说,假设我在列表模式,然后选择一个按钮进入编辑界面。该应用目前隐藏列表布局,显示了另一布局。)。
So I'm working on adding ActionBarSherlock and the Navigation Drawer to a project that previously implemented a custom (very poorly written) "action bar". Instead of using fragments and a backstack of activities for navigation, some activities show and hide different layouts. (That is, suppose I am in a list mode and then select a button to go into an edit screen. The app currently hides the list layout and shows another layout.).
所以,我已经添加了动作条福尔摩斯和导航抽屉所有的活动。我希望能够以编程方式从3线箭头切换导航图标时,某些按钮是pressed。
So I've added actionbar sherlock and a navigation drawer to all the activities. I want to be able to programmatically switch the navigation icon from the 3 lines to the arrow when certain buttons are pressed.
我无法弄清楚如何做到这一点,虽然。任何想法?
I can't figure out how to do this though. Any ideas?
谢谢!
推荐答案
解决这个问题的方法是使用的方法:
The solution to this problem is to use the method:
setDrawerIndicatorEnabled(boolean enable)
在 ActionBarDrawerToggle
类。
这篇关于在Android动作条设置导航图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!