Skip to content

Commit

Permalink
- show back button when we have a fragment stack
Browse files Browse the repository at this point in the history
  • Loading branch information
ncapdevi committed Nov 22, 2016
1 parent ba8aaf9 commit fd64e86
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,19 @@ public void pushFragment(Fragment fragment) {

@Override
public void onTabTransaction(Fragment fragment, int index) {
//do tabby stuff
// If we have a backstack, show the back button
if(getSupportActionBar() != null){
getSupportActionBar().setDisplayHomeAsUpEnabled(mNavController.canPop());
}
}

@Override
public void onFragmentTransaction(Fragment fragment) {
//do fragmentty stuff. Maybe change title, I'm not going to tell you how to live your life
// If we have a backstack, show the back button
if(getSupportActionBar() != null){
getSupportActionBar().setDisplayHomeAsUpEnabled(mNavController.canPop());
}
}

@Override
Expand Down

0 comments on commit fd64e86

Please sign in to comment.