diff options
author | Scott Jackson <daneren2005@gmail.com> | 2015-06-25 22:48:14 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2015-06-25 22:48:14 -0700 |
commit | adc088cd8f34d14c84aea991b4d9228cf1d93b43 (patch) | |
tree | 9f2ac927228bacdbd76882257678da4220aade63 /app/src/main | |
parent | ababf86535f0434aadeeb68f2b1eb818fa6939a9 (diff) | |
download | dsub-adc088cd8f34d14c84aea991b4d9228cf1d93b43.tar.gz dsub-adc088cd8f34d14c84aea991b4d9228cf1d93b43.tar.bz2 dsub-adc088cd8f34d14c84aea991b4d9228cf1d93b43.zip |
Revert previous change since it causes bar to not show up at start
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java | 45 | ||||
-rw-r--r-- | app/src/main/res/layout/abstract_fragment_activity.xml | 3 |
2 files changed, 22 insertions, 26 deletions
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"> <FrameLayout android:id="@+id/slide_up_swipe_target" |