aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-06-18 20:58:46 -0700
committerScott Jackson <daneren2005@gmail.com>2013-06-18 20:58:46 -0700
commit9ba93d8a887fac10bb385dc4f2004bbaf1637167 (patch)
treec6b34d71bc9f1be278fd6a8f3f55d922939daa48
parent9f7710955aaeba07cb727f01451c0b2ac922f88c (diff)
downloaddsub-9ba93d8a887fac10bb385dc4f2004bbaf1637167.tar.gz
dsub-9ba93d8a887fac10bb385dc4f2004bbaf1637167.tar.bz2
dsub-9ba93d8a887fac10bb385dc4f2004bbaf1637167.zip
Remove bottom bar if nothing is actively playing
-rw-r--r--subsonic-android/res/layout/main.xml3
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java8
2 files changed, 6 insertions, 5 deletions
diff --git a/subsonic-android/res/layout/main.xml b/subsonic-android/res/layout/main.xml
index a2a46a1e..c388327d 100644
--- a/subsonic-android/res/layout/main.xml
+++ b/subsonic-android/res/layout/main.xml
@@ -21,7 +21,8 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/media_button"
- android:orientation="horizontal" >
+ android:orientation="horizontal"
+ android:visibility="gone">
<ImageView
android:id="@+id/album_art"
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java
index 2709db46..1095d8e3 100644
--- a/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java
+++ b/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java
@@ -40,6 +40,7 @@ public class MainActivity extends SubsonicActivity {
private static final String TAG = MainActivity.class.getSimpleName();
private static boolean infoDialogDisplayed;
private ScheduledExecutorService executorService;
+ private View bottomBar;
private View coverArtView;
private TextView trackView;
private TextView artistView;
@@ -61,7 +62,7 @@ public class MainActivity extends SubsonicActivity {
setContentView(R.layout.main);
loadSettings();
- View bottomBar = findViewById(R.id.bottom_bar);
+ bottomBar = findViewById(R.id.bottom_bar);
bottomBar.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent intent = new Intent();
@@ -248,12 +249,11 @@ public class MainActivity extends SubsonicActivity {
DownloadFile current = getDownloadService().getCurrentPlaying();
if(current == null) {
- trackView.setText("Title");
- artistView.setText("Artist");
- getImageLoader().loadImage(coverArtView, null, false, false);
+ bottomBar.setVisibility(View.GONE);
return;
}
+ bottomBar.setVisibility(View.VISIBLE);
MusicDirectory.Entry song = current.getSong();
trackView.setText(song.getTitle());
artistView.setText(song.getArtist());