Sto tentando di personalizzare l'impostazione predefinita "Navigazione verso l'alto" contentDescription
associata al pulsante su dello ActionBar
(utilizzo ActionBarSherlock).Imposta contenutoDescrizione per azioneBar pulsante su
Da fonte ActionBarView
s':
public void setHomeButtonEnabled(boolean enable) {
mHomeLayout.setEnabled(enable);
mHomeLayout.setFocusable(enable);
// Make sure the home button has an accurate content description for 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));
}
}
così la chiave sarebbe come ottenere un riferimento a mHomeLayout
. getWindow().getDecorView().findViewById(android.R.id.home)
non funziona, poiché restituisce un ImageView.
Come posso fare?
Grazie;)