The new Android design docs mention use of an Up caret: http://developer.android.com/design/patterns/actionbar.html
The up caret seems to be proper for navigation throughout Android - is there a proper way to add this caret? It seems unintuitive that I should just modify the icon image to include it.
Any help would be much appreciated!
You can also add the caret by setting setDisplayHomeAsUpEnabled(true) on the ActionBar. Be sure to react to the menu item when selected.
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
ActionBar actionBar = getActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setDisplayShowTitleEnabled(true);
}
@Override
public boolean onOptionsItemSelected(MenuItem item)
{
switch( item.getItemId() ) {
case android.R.id.home:
Log.d(TAG, "Home Icon Item Selected");
return true;
default:
return super.onOptionsItemSelected(item);
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With