I'm developing an app with ActionBars which supports Gingerbread and up. So basically I'm using the support library and extending
ActionBarActivity
for all my activities. Everything works well except for the
onSupportNavigateUp()
method. It just does not get called as stated in the documentation.
This method is called whenever the user chooses to navigate Up within your application's activity hierarchy from the action bar.
This is quite easy but I haven't been able to figure out why it does not work as expected nor Googling helped. Is this a bug? or am I missing something?
if you override onOptionsItemSelected
, then onSupportNavigateUp
will not be called.
@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: // handle ⬅️ button here break; } return true; }
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