diff options
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java | 7 | ||||
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java | 15 |
2 files changed, 6 insertions, 16 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java index f336d178..f7cdd92c 100644 --- a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java +++ b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java @@ -818,11 +818,12 @@ public class SubsonicActivity extends AppCompatActivity implements OnItemSelecte if(currentFragment == null || currentFragment.getTitle() == null) { return; } - if(spinnerAdapter == null) { + if(spinnerAdapter == null || getSupportActionBar().getCustomView() == null) { createCustomActionBarView(); } if(backStack.size() > 0) { + createCustomActionBarView(); spinnerAdapter.clear(); for(int i = 0; i < backStack.size(); i++) { CharSequence title = backStack.get(i).getTitle(); @@ -842,9 +843,13 @@ public class SubsonicActivity extends AppCompatActivity implements OnItemSelecte if(!isTv()) { getSupportActionBar().setDisplayShowCustomEnabled(true); } + + drawerToggle.setDrawerIndicatorEnabled(false); + getSupportActionBar().setDisplayHomeAsUpEnabled(true); } else if(!isTv()) { getSupportActionBar().setTitle(currentFragment.getTitle()); getSupportActionBar().setDisplayShowCustomEnabled(false); + drawerToggle.setDrawerIndicatorEnabled(true); } } diff --git a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java index 56b14ca9..7808d8c0 100644 --- a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java +++ b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java @@ -190,16 +190,7 @@ public class SubsonicFragmentActivity extends SubsonicActivity implements Downlo nowPlayingToolbar.setVisibility(View.GONE); nowPlayingFragment.setPrimaryFragment(false); setSupportActionBar(mainToolbar); - - if(getSupportActionBar().getCustomView() == null) { - createCustomActionBarView(); - } recreateSpinner(); - if(drawerToggle != null && backStack.size() > 0) { - drawerToggle.setDrawerIndicatorEnabled(false); - } else { - drawerToggle.setDrawerIndicatorEnabled(true); - } } @Override @@ -488,9 +479,6 @@ public class SubsonicFragmentActivity extends SubsonicActivity implements Downlo trans.commit(); } else { super.replaceFragment(fragment, tag, replaceCurrent); - if (drawerToggle != null) { - drawerToggle.setDrawerIndicatorEnabled(false); - } } } @Override @@ -507,9 +495,6 @@ public class SubsonicFragmentActivity extends SubsonicActivity implements Downlo supportInvalidateOptionsMenu(); } else { super.removeCurrent(); - if (drawerToggle != null && backStack.isEmpty()) { - drawerToggle.setDrawerIndicatorEnabled(true); - } } } |