aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-02-18 11:00:10 -0800
committerScott Jackson <daneren2005@gmail.com>2013-02-18 11:00:10 -0800
commitbec14784af5ceef1f99d60e034981f1a7c1a2757 (patch)
tree80ccb3c0a8160592af8b705beeb25a2ad08b71a7 /subsonic-android/src
parent309926d441c4879eb1bcc6f50abce652a0466415 (diff)
downloaddsub-bec14784af5ceef1f99d60e034981f1a7c1a2757.tar.gz
dsub-bec14784af5ceef1f99d60e034981f1a7c1a2757.tar.bz2
dsub-bec14784af5ceef1f99d60e034981f1a7c1a2757.zip
Don't jump back to the top after moving items
Diffstat (limited to 'subsonic-android/src')
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java
index 195d6001..f7ee55d3 100644
--- a/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java
+++ b/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java
@@ -36,6 +36,7 @@ import android.graphics.Color;
import android.graphics.Typeface;
import android.os.Bundle;
import android.os.Handler;
+import android.os.Parcelable;
import android.util.Log;
import android.view.ContextMenu;
import android.view.Display;
@@ -816,9 +817,16 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi
else
emptyTextView.setText(R.string.download_empty);
+ // Save old position
+ Parcelable state = playlistView.onSaveInstanceState();
+ // Set new items
playlistView.setAdapter(new SongListAdapter(list));
+
emptyTextView.setVisibility(list.isEmpty() ? View.VISIBLE : View.GONE);
currentRevision = downloadService.getDownloadListUpdateRevision();
+
+ // Restore old position
+ playlistView.onRestoreInstanceState(state);
switch (downloadService.getRepeatMode()) {
case OFF: