aboutsummaryrefslogtreecommitdiff
path: root/src/github/daneren2005
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-07-08 18:58:31 -0700
committerScott Jackson <daneren2005@gmail.com>2014-07-08 18:58:31 -0700
commita1309bd699076feb5e00a93b8ce5764e66229011 (patch)
treeecc13b5e5a8aff3ece5b55df57afdafc852646cf /src/github/daneren2005
parent74b431d2647be50adfc9da667fb3bbabb693a6c7 (diff)
downloaddsub-a1309bd699076feb5e00a93b8ce5764e66229011.tar.gz
dsub-a1309bd699076feb5e00a93b8ce5764e66229011.tar.bz2
dsub-a1309bd699076feb5e00a93b8ce5764e66229011.zip
#372 Keep selected position when moving to DownloadActivity
Diffstat (limited to 'src/github/daneren2005')
-rw-r--r--src/github/daneren2005/dsub/activity/SubsonicActivity.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/activity/SubsonicActivity.java b/src/github/daneren2005/dsub/activity/SubsonicActivity.java
index 44310ede..395a347e 100644
--- a/src/github/daneren2005/dsub/activity/SubsonicActivity.java
+++ b/src/github/daneren2005/dsub/activity/SubsonicActivity.java
@@ -114,6 +114,10 @@ public class SubsonicActivity extends ActionBarActivity implements OnItemSelecte
getSupportActionBar().setCustomView(actionbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeButtonEnabled(true);
+
+ if(getIntent().hasExtra(Constants.FRAGMENT_POSITION)) {
+ lastSelectedPosition = getIntent().getIntExtra(Constants.FRAGMENT_POSITION, 0);
+ }
}
@Override
@@ -157,6 +161,14 @@ public class SubsonicActivity extends ActionBarActivity implements OnItemSelecte
}
@Override
+ public void startActivity(Intent intent) {
+ if("github.daneren2005.dsub.activity.DownloadActivity".equals(intent.getComponent().getClassName())) {
+ intent.putExtra(Constants.FRAGMENT_POSITION, lastSelectedPosition);
+ }
+ super.startActivity(intent);
+ }
+
+ @Override
public void setContentView(int viewId) {
super.setContentView(R.layout.abstract_activity);
rootView = (ViewGroup) findViewById(R.id.content_frame);