ActionBarSherlock icon indicating copy to clipboard operation
ActionBarSherlock copied to clipboard

Cannot modify 'Up' drawable when action items are expanded/collapsed

Open bri822 opened this issue 13 years ago • 3 comments

My application replaces the 'Up' icon by overwriting the 'homeAsUpIndicator' attribute to a custom icon. I'm replacing it with 3 bars to indicate a slide out menu as mentioned in the last Android Design Guidelines.

Based on the design of Ice Cream sandwich apps, when a search action item is expanded on the action bar, the Home icon should switch to the original 'Up' arrow. I was unable to find a way to programmatically access the ImageView or to change the drawable in the ImageView (id: abs__up).

If ActionBarSherlock could replace a custom Up drawable with the default Up arrow when the user expands an action item, that'd be great. Otherwise, I can manually change the icon if some API is provided to allow me to set the Drawable of the Up ImageView.

If some existing work around exists, then I'm sorry to open this issue and please let me know how I can resolve this issue. Thank you!

bri822 avatar Jun 19 '13 14:06 bri822

The ActionBar does not currently expose any API to change the up button in java. Look at e.g. the support library drawer for how it changes the icon.

SimonVT avatar Jun 19 '13 14:06 SimonVT

Thanks Simon, I found the ActionBarDrawerToggle was merged in two days ago. https://github.com/JakeWharton/ActionBarSherlock/pull/946

The ActionBarDrawerToggle is exactly what I am looking for and am excited to see the support libs finally updated to allow ABS to merge it in. Can't wait for the next release to try it out.

bri822 avatar Jul 25 '13 04:07 bri822

is this in the latest release already? can't find in the changelog

felipecsl avatar Aug 23 '13 00:08 felipecsl