From fda62834ccbfdaf76f918e13fa59da6f78c79591 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Wed, 31 Oct 2012 20:51:23 -0700 Subject: Always display tabs on Now Playing --- subsonic-android/res/layout-land/download.xml | 2 +- subsonic-android/res/layout-port/download.xml | 2 +- .../res/layout/download_button_bar_flipper.xml | 67 ---------------------- subsonic-android/res/layout/download_slider.xml | 51 ++++++++++++---- .../dsub/activity/DownloadActivity.java | 18 ------ 5 files changed, 43 insertions(+), 97 deletions(-) delete mode 100644 subsonic-android/res/layout/download_button_bar_flipper.xml diff --git a/subsonic-android/res/layout-land/download.xml b/subsonic-android/res/layout-land/download.xml index 1c752542..8e54c184 100644 --- a/subsonic-android/res/layout-land/download.xml +++ b/subsonic-android/res/layout-land/download.xml @@ -210,6 +210,6 @@ - + diff --git a/subsonic-android/res/layout-port/download.xml b/subsonic-android/res/layout-port/download.xml index 4b077bfd..906179ea 100644 --- a/subsonic-android/res/layout-port/download.xml +++ b/subsonic-android/res/layout-port/download.xml @@ -136,7 +136,7 @@ - + diff --git a/subsonic-android/res/layout/download_button_bar_flipper.xml b/subsonic-android/res/layout/download_button_bar_flipper.xml deleted file mode 100644 index 9c885359..00000000 --- a/subsonic-android/res/layout/download_button_bar_flipper.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/subsonic-android/res/layout/download_slider.xml b/subsonic-android/res/layout/download_slider.xml index 549950a0..32e146e7 100644 --- a/subsonic-android/res/layout/download_slider.xml +++ b/subsonic-android/res/layout/download_slider.xml @@ -1,13 +1,44 @@ - + android:layout_width="fill_parent" + android:background="@android:color/transparent"> + + + + + + + \ No newline at end of file diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java index bd0a9e48..059b6189 100644 --- a/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java +++ b/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java @@ -87,11 +87,8 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi private static final int COLOR_BUTTON_DISABLED = Color.rgb(164, 166, 158); private ViewFlipper playlistFlipper; - private ViewFlipper buttonBarFlipper; private TextView emptyTextView; private TextView songTitleTextView; - private TextView albumTextView; - private TextView artistTextView; private ImageView albumArtImageView; private ListView playlistView; private TextView positionTextView; @@ -136,11 +133,8 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi gestureScanner = new GestureDetector(this); playlistFlipper = (ViewFlipper) findViewById(R.id.download_playlist_flipper); - buttonBarFlipper = (ViewFlipper) findViewById(R.id.download_button_bar_flipper); emptyTextView = (TextView) findViewById(R.id.download_empty); songTitleTextView = (TextView) findViewById(R.id.download_song_title); - albumTextView = (TextView) findViewById(R.id.download_album); - artistTextView = (TextView) findViewById(R.id.download_artist); albumArtImageView = (ImageView) findViewById(R.id.download_album_art_image); positionTextView = (TextView) findViewById(R.id.download_position); durationTextView = (TextView) findViewById(R.id.download_duration); @@ -189,7 +183,6 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi equalizerButton.setOnTouchListener(touchListener); visualizerButton.setOnTouchListener(touchListener); jukeboxButton.setOnTouchListener(touchListener); - buttonBarFlipper.setOnTouchListener(touchListener); emptyTextView.setOnTouchListener(touchListener); albumArtImageView.setOnTouchListener(touchListener); @@ -399,7 +392,6 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi DownloadService downloadService = getDownloadService(); if (downloadService == null || downloadService.getCurrentPlaying() == null) { playlistFlipper.setDisplayedChild(1); - buttonBarFlipper.setDisplayedChild(1); } onDownloadListChanged(); @@ -684,16 +676,10 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi playlistFlipper.setInAnimation(AnimationUtils.loadAnimation(this, R.anim.push_down_in)); playlistFlipper.setOutAnimation(AnimationUtils.loadAnimation(this, R.anim.push_down_out)); playlistFlipper.setDisplayedChild(0); - buttonBarFlipper.setInAnimation(AnimationUtils.loadAnimation(this, R.anim.push_down_in)); - buttonBarFlipper.setOutAnimation(AnimationUtils.loadAnimation(this, R.anim.push_down_out)); - buttonBarFlipper.setDisplayedChild(0); } else { playlistFlipper.setInAnimation(AnimationUtils.loadAnimation(this, R.anim.push_up_in)); playlistFlipper.setOutAnimation(AnimationUtils.loadAnimation(this, R.anim.push_up_out)); playlistFlipper.setDisplayedChild(1); - buttonBarFlipper.setInAnimation(AnimationUtils.loadAnimation(this, R.anim.push_up_in)); - buttonBarFlipper.setOutAnimation(AnimationUtils.loadAnimation(this, R.anim.push_up_out)); - buttonBarFlipper.setDisplayedChild(1); } } @@ -754,14 +740,10 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi if (currentPlaying != null) { MusicDirectory.Entry song = currentPlaying.getSong(); songTitleTextView.setText(song.getTitle()); - albumTextView.setText(song.getAlbum()); - artistTextView.setText(song.getArtist()); getImageLoader().loadImage(albumArtImageView, song, true, true); starButton.setImageResource(song.isStarred() ? android.R.drawable.btn_star_big_on : android.R.drawable.btn_star_big_off); } else { songTitleTextView.setText(null); - albumTextView.setText(null); - artistTextView.setText(null); getImageLoader().loadImage(albumArtImageView, null, true, false); starButton.setImageResource(android.R.drawable.btn_star_big_off); } -- cgit v1.2.3