diff options
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" |