android - Set contentDescription for ActionBar's up button -


i'm trying customize "navigate up" default contentdescription associated button of actionbar (i'm using actionbarsherlock).

from actionbarview's source:

public void sethomebuttonenabled(boolean enable) {     mhomelayout.setenabled(enable);     mhomelayout.setfocusable(enable);     // make sure home button has accurate content description accessibility.     if (!enable) {         mhomelayout.setcontentdescription(null);     } else if ((mdisplayoptions & actionbar.display_home_as_up) != 0) {         mhomelayout.setcontentdescription(mcontext.getresources().gettext(                 r.string.abs__action_bar_up_description));     } else {         mhomelayout.setcontentdescription(mcontext.getresources().gettext(                 r.string.abs__action_bar_home_description));     } } 

so key how reference mhomelayout. getwindow().getdecorview().findviewbyid(android.r.id.home) not working, it's returning imageview.

how do?

thanks ;)

here how can need in previous project :

((view) getwindow().getdecorview().findviewbyid(android.r.id.home).getparent().getparent()).setcontentdescription("blablabla"); 

using viewhierarchy plugin helps me understand how actionbar layout build.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -