diff options
author | Scott Jackson <daneren2005@gmail.com> | 2013-02-18 11:00:10 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2013-02-18 11:00:10 -0800 |
commit | bec14784af5ceef1f99d60e034981f1a7c1a2757 (patch) | |
tree | 80ccb3c0a8160592af8b705beeb25a2ad08b71a7 /subsonic-android/src | |
parent | 309926d441c4879eb1bcc6f50abce652a0466415 (diff) | |
download | dsub-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.java | 8 |
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: |