aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-06-25 08:57:26 -0700
committerScott Jackson <daneren2005@gmail.com>2015-06-25 08:57:26 -0700
commit87d5c3552d89e245707fe59d95e5cc0b2431e61e (patch)
treee9acfb5ad7bcad19c933cd437df33c7f7ae993f3
parentadc088cd8f34d14c84aea991b4d9228cf1d93b43 (diff)
downloaddsub-87d5c3552d89e245707fe59d95e5cc0b2431e61e.tar.gz
dsub-87d5c3552d89e245707fe59d95e5cc0b2431e61e.tar.bz2
dsub-87d5c3552d89e245707fe59d95e5cc0b2431e61e.zip
Reimplement hiding bottom bar using setPanelState(HIDDEN)
-rw-r--r--app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java12
1 files changed, 9 insertions, 3 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 f7ba429f..43bd15c7 100644
--- a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java
+++ b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java
@@ -597,6 +597,9 @@ public class SubsonicFragmentActivity extends SubsonicActivity {
DownloadFile current = downloadService.getCurrentPlaying();
PlayerState state = downloadService.getPlayerState();
if(current == currentPlaying && state == currentState) {
+ if(current == null && slideUpPanel.getPanelState() == SlidingUpPanelLayout.PanelState.COLLAPSED) {
+ slideUpPanel.setPanelState(SlidingUpPanelLayout.PanelState.HIDDEN);
+ }
return;
} else {
currentPlaying = current;
@@ -608,9 +611,12 @@ public class SubsonicFragmentActivity extends SubsonicActivity {
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(slideUpPanel.getPanelState() == SlidingUpPanelLayout.PanelState.HIDDEN) {
+ slideUpPanel.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
+ }
+ } else if(slideUpPanel.getPanelState() == SlidingUpPanelLayout.PanelState.COLLAPSED) {
+ slideUpPanel.setPanelState(SlidingUpPanelLayout.PanelState.HIDDEN);
}
if (coverArtView != null) {