From adc088cd8f34d14c84aea991b4d9228cf1d93b43 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Thu, 25 Jun 2015 22:48:14 -0700 Subject: Revert previous change since it causes bar to not show up at start --- .../dsub/activity/SubsonicFragmentActivity.java | 45 ++++++++++------------ .../main/res/layout/abstract_fragment_activity.xml | 3 +- 2 files changed, 22 insertions(+), 26 deletions(-) (limited to 'app') diff --git a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java index c7661080..f7ba429f 100644 --- a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java +++ b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java @@ -604,33 +604,30 @@ public class SubsonicFragmentActivity extends SubsonicActivity { } MusicDirectory.Entry song = null; - if(current != null || slideUpFrame.getVisibility() != View.GONE) { - slideUpFrame.setVisibility(View.VISIBLE); - if (current != null) { - song = current.getSong(); - trackView.setText(song.getTitle()); - artistView.setText(song.getArtist()); - } else { - trackView.setText(R.string.main_title); - artistView.setText(R.string.main_artist); - } + if (current != null) { + song = current.getSong(); + trackView.setText(song.getTitle()); + artistView.setText(song.getArtist()); + } else { + trackView.setText(R.string.main_title); + artistView.setText(R.string.main_artist); + } - if (coverArtView != null) { - int height = coverArtView.getHeight(); - if (height <= 0) { - int[] attrs = new int[]{R.attr.actionBarSize}; - TypedArray typedArray = this.obtainStyledAttributes(attrs); - height = typedArray.getDimensionPixelSize(0, 0); - typedArray.recycle(); - } - getImageLoader().loadImage(coverArtView, song, false, height, false); + if (coverArtView != null) { + int height = coverArtView.getHeight(); + if (height <= 0) { + int[] attrs = new int[]{R.attr.actionBarSize}; + TypedArray typedArray = this.obtainStyledAttributes(attrs); + height = typedArray.getDimensionPixelSize(0, 0); + typedArray.recycle(); } - - int[] attrs = new int[]{(state == PlayerState.STARTED) ? R.attr.actionbar_pause : R.attr.actionbar_start}; - TypedArray typedArray = this.obtainStyledAttributes(attrs); - startButton.setImageResource(typedArray.getResourceId(0, 0)); - typedArray.recycle(); + getImageLoader().loadImage(coverArtView, song, false, height, false); } + + int[] attrs = new int[]{(state == PlayerState.STARTED) ? R.attr.actionbar_pause : R.attr.actionbar_start}; + TypedArray typedArray = this.obtainStyledAttributes(attrs); + startButton.setImageResource(typedArray.getResourceId(0, 0)); + typedArray.recycle(); } public void checkUpdates() { diff --git a/app/src/main/res/layout/abstract_fragment_activity.xml b/app/src/main/res/layout/abstract_fragment_activity.xml index 44ac35fd..672698de 100644 --- a/app/src/main/res/layout/abstract_fragment_activity.xml +++ b/app/src/main/res/layout/abstract_fragment_activity.xml @@ -30,8 +30,7 @@ android:id="@+id/slide_up_frame" android:layout_width="match_parent" android:layout_height="match_parent" - android:orientation="vertical" - android:visibility="gone"> + android:orientation="vertical">