Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

android ancestral navigation

@Override
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
  int itemId = item.getItemId();
  if (itemId == android.R.id.home) {
    // force up navigation to have the same behavior as temporal navigation
    onBackPressed();
    return true;
  } else {
    return super.onOptionsItemSelected(item);
  }
}
 
PREVIOUS NEXT
Tagged: #android #ancestral #navigation
ADD COMMENT
Topic
Name
7+2 =