Everything is set properly in the manifest when I click the icon it works as expected, however no < arrow is shown on the ActionBar. Any ideas?
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_HOME | ActionBar.DISPLAY_SHOW_CUSTOM);
actionBar.setCustomView(R.layout.actionbar_view);
The bits you're passing into ActionBar.setDisplayOptions are telling the ActionBar to only show the "home" icon and your custom view. You should also pass in ActionBar.DISPLAY_HOME_AS_UP. As in:
actionBar.setDisplayOptions(ActionBar.DISPLAY_HOME_AS_UP
| ActionBar.DISPLAY_SHOW_HOME | ActionBar.DISPLAY_SHOW_CUSTOM);
Alternatively, just call ActionBar.setDisplayShowCustomEnabled:
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setDisplayShowCustomEnabled(true);
actionBar.setCustomView(R.layout.actionbar_view);
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