diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/github/daneren2005/dsub/activity/SubsonicActivity.java | 8 | ||||
-rw-r--r-- | src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java | 19 |
2 files changed, 22 insertions, 5 deletions
diff --git a/src/github/daneren2005/dsub/activity/SubsonicActivity.java b/src/github/daneren2005/dsub/activity/SubsonicActivity.java index b041e18c..4f6af4d5 100644 --- a/src/github/daneren2005/dsub/activity/SubsonicActivity.java +++ b/src/github/daneren2005/dsub/activity/SubsonicActivity.java @@ -208,9 +208,7 @@ public class SubsonicActivity extends ActionBarActivity implements OnItemSelecte }
};
drawer.setDrawerListener(drawerToggle);
- if(this.getClass() != SubsonicFragmentActivity.class) {
- drawerToggle.setDrawerIndicatorEnabled(false);
- }
+ drawerToggle.setDrawerIndicatorEnabled(false);
}
@Override
@@ -255,7 +253,7 @@ public class SubsonicActivity extends ActionBarActivity implements OnItemSelecte if(drawerToggle.onOptionsItemSelected(item)) {
return true;
} else if(item.getItemId() == android.R.id.home) {
- finish();
+ onBackPressed();
return true;
}
@@ -365,7 +363,7 @@ public class SubsonicActivity extends ActionBarActivity implements OnItemSelecte trans.commit();
recreateSpinner();
}
- private void removeCurrent() {
+ protected void removeCurrent() {
if(currentFragment != null) {
currentFragment.setPrimaryFragment(false);
}
diff --git a/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java b/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java index e3975703..5e3835a3 100644 --- a/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java +++ b/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java @@ -250,6 +250,12 @@ public class SubsonicFragmentActivity extends SubsonicActivity { }
@Override
+ public void setContentView(int viewId) {
+ super.setContentView(viewId);
+ drawerToggle.setDrawerIndicatorEnabled(true);
+ }
+
+ @Override
public boolean onOptionsItemSelected(MenuItem item) {
if(super.onOptionsItemSelected(item)) {
return true;
@@ -269,6 +275,19 @@ public class SubsonicFragmentActivity extends SubsonicActivity { }
}
}
+
+ @Override
+ public void replaceFragment(SubsonicFragment fragment, int id, int tag) {
+ super.replaceFragment(fragment, id, tag);
+ drawerToggle.setDrawerIndicatorEnabled(false);
+ }
+ @Override
+ protected void removeCurrent() {
+ super.removeCurrent();
+ if(backStack.isEmpty()) {
+ drawerToggle.setDrawerIndicatorEnabled(true);
+ }
+ }
@Override
public void startFragmentActivity(String fragmentType) {
|