aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2012-10-31 20:51:23 -0700
committerScott Jackson <daneren2005@gmail.com>2012-10-31 20:51:23 -0700
commitfda62834ccbfdaf76f918e13fa59da6f78c79591 (patch)
tree39028d43c35f8a4112998e67d1c0df242cf4f463
parentb1105a707296d935fdec45f53d7ac317d058c8ae (diff)
downloaddsub-fda62834ccbfdaf76f918e13fa59da6f78c79591.tar.gz
dsub-fda62834ccbfdaf76f918e13fa59da6f78c79591.tar.bz2
dsub-fda62834ccbfdaf76f918e13fa59da6f78c79591.zip
Always display tabs on Now Playing
-rw-r--r--subsonic-android/res/layout-land/download.xml2
-rw-r--r--subsonic-android/res/layout-port/download.xml2
-rw-r--r--subsonic-android/res/layout/download_button_bar_flipper.xml67
-rw-r--r--subsonic-android/res/layout/download_slider.xml51
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java18
5 files changed, 43 insertions, 97 deletions
diff --git a/subsonic-android/res/layout-land/download.xml b/subsonic-android/res/layout-land/download.xml
index 1c752542..8e54c184 100644
--- a/subsonic-android/res/layout-land/download.xml
+++ b/subsonic-android/res/layout-land/download.xml
@@ -210,6 +210,6 @@
<include layout="@layout/download_slider"/>
- <include layout="@layout/download_button_bar_flipper"/>
+ <include layout="@layout/button_bar"/>
</LinearLayout>
diff --git a/subsonic-android/res/layout-port/download.xml b/subsonic-android/res/layout-port/download.xml
index 4b077bfd..906179ea 100644
--- a/subsonic-android/res/layout-port/download.xml
+++ b/subsonic-android/res/layout-port/download.xml
@@ -136,7 +136,7 @@
<include layout="@layout/download_slider"/>
- <include layout="@layout/download_button_bar_flipper"/>
+ <include layout="@layout/button_bar"/>
</LinearLayout>
diff --git a/subsonic-android/res/layout/download_button_bar_flipper.xml b/subsonic-android/res/layout/download_button_bar_flipper.xml
deleted file mode 100644
index 9c885359..00000000
--- a/subsonic-android/res/layout/download_button_bar_flipper.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<github.daneren2005.dsub.util.MyViewFlipper
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/download_button_bar_flipper"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:background="@android:color/transparent">
-
- <RelativeLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:background="@android:color/transparent"
- android:paddingLeft="8dip"
- android:paddingRight="8dip">
-
- <TextView
- android:id="@+id/download_position"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_alignParentTop="true"
- android:layout_marginRight="6dip"
- android:text="0:00"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="@color/mediaControlForeground"/>
- <TextView
- android:id="@+id/download_duration"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true"
- android:layout_marginLeft="6dip"
- android:text="-:--"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="@color/mediaControlForeground"/>
- <TextView
- android:id="@+id/download_artist"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toRightOf="@+id/download_position"
- android:layout_toLeftOf="@+id/download_duration"
- android:layout_centerHorizontal="true"
- android:layout_alignParentTop="true"
- android:singleLine="true"
- android:ellipsize="end"
- android:gravity="center_horizontal"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="#c0c0c0"/>
- <TextView
- android:id="@+id/download_album"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerHorizontal="true"
- android:layout_below="@+id/download_artist"
- android:singleLine="true"
- android:ellipsize="end"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="#c0c0c0"/>
- </RelativeLayout>
-
- <include layout="@layout/button_bar"/>
-
-</github.daneren2005.dsub.util.MyViewFlipper>
-
-
-
-
diff --git a/subsonic-android/res/layout/download_slider.xml b/subsonic-android/res/layout/download_slider.xml
index 549950a0..32e146e7 100644
--- a/subsonic-android/res/layout/download_slider.xml
+++ b/subsonic-android/res/layout/download_slider.xml
@@ -1,13 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
-<github.daneren2005.dsub.util.HorizontalSlider
+<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
- style="?android:attr/progressBarStyleHorizontal"
- android:id="@+id/download_progress_bar"
- android:indeterminate="false"
- android:background="@android:color/transparent"
- android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:paddingLeft="7dip"
- android:paddingRight="7dip"
- android:paddingTop="3dip"
- android:paddingBottom="7dip"/>
+ android:layout_width="fill_parent"
+ android:background="@android:color/transparent">
+
+ <TextView
+ android:id="@+id/download_position"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:layout_centerVertical="true"
+ android:paddingLeft="8dip"
+ android:text="0:00"
+ android:textSize="12sp"
+ android:textColor="?android:textColorPrimary"
+ android:paddingBottom="4dip"/>
+
+ <github.daneren2005.dsub.util.HorizontalSlider
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ style="?android:attr/progressBarStyleHorizontal"
+ android:id="@+id/download_progress_bar"
+ android:indeterminate="false"
+ android:background="@android:color/transparent"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:paddingLeft="55dip"
+ android:paddingRight="55dip"
+ android:paddingTop="3dip"
+ android:paddingBottom="7dip"/>
+
+ <TextView
+ android:id="@+id/download_duration"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:layout_centerVertical="true"
+ android:paddingRight="8dip"
+ android:text="-:--"
+ android:textSize="12sp"
+ android:textColor="?android:textColorPrimary"
+ android:paddingBottom="4dip"/>
+</RelativeLayout> \ No newline at end of file
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java
index bd0a9e48..059b6189 100644
--- a/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java
+++ b/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java
@@ -87,11 +87,8 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi
private static final int COLOR_BUTTON_DISABLED = Color.rgb(164, 166, 158);
private ViewFlipper playlistFlipper;
- private ViewFlipper buttonBarFlipper;
private TextView emptyTextView;
private TextView songTitleTextView;
- private TextView albumTextView;
- private TextView artistTextView;
private ImageView albumArtImageView;
private ListView playlistView;
private TextView positionTextView;
@@ -136,11 +133,8 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi
gestureScanner = new GestureDetector(this);
playlistFlipper = (ViewFlipper) findViewById(R.id.download_playlist_flipper);
- buttonBarFlipper = (ViewFlipper) findViewById(R.id.download_button_bar_flipper);
emptyTextView = (TextView) findViewById(R.id.download_empty);
songTitleTextView = (TextView) findViewById(R.id.download_song_title);
- albumTextView = (TextView) findViewById(R.id.download_album);
- artistTextView = (TextView) findViewById(R.id.download_artist);
albumArtImageView = (ImageView) findViewById(R.id.download_album_art_image);
positionTextView = (TextView) findViewById(R.id.download_position);
durationTextView = (TextView) findViewById(R.id.download_duration);
@@ -189,7 +183,6 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi
equalizerButton.setOnTouchListener(touchListener);
visualizerButton.setOnTouchListener(touchListener);
jukeboxButton.setOnTouchListener(touchListener);
- buttonBarFlipper.setOnTouchListener(touchListener);
emptyTextView.setOnTouchListener(touchListener);
albumArtImageView.setOnTouchListener(touchListener);
@@ -399,7 +392,6 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi
DownloadService downloadService = getDownloadService();
if (downloadService == null || downloadService.getCurrentPlaying() == null) {
playlistFlipper.setDisplayedChild(1);
- buttonBarFlipper.setDisplayedChild(1);
}
onDownloadListChanged();
@@ -684,16 +676,10 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi
playlistFlipper.setInAnimation(AnimationUtils.loadAnimation(this, R.anim.push_down_in));
playlistFlipper.setOutAnimation(AnimationUtils.loadAnimation(this, R.anim.push_down_out));
playlistFlipper.setDisplayedChild(0);
- buttonBarFlipper.setInAnimation(AnimationUtils.loadAnimation(this, R.anim.push_down_in));
- buttonBarFlipper.setOutAnimation(AnimationUtils.loadAnimation(this, R.anim.push_down_out));
- buttonBarFlipper.setDisplayedChild(0);
} else {
playlistFlipper.setInAnimation(AnimationUtils.loadAnimation(this, R.anim.push_up_in));
playlistFlipper.setOutAnimation(AnimationUtils.loadAnimation(this, R.anim.push_up_out));
playlistFlipper.setDisplayedChild(1);
- buttonBarFlipper.setInAnimation(AnimationUtils.loadAnimation(this, R.anim.push_up_in));
- buttonBarFlipper.setOutAnimation(AnimationUtils.loadAnimation(this, R.anim.push_up_out));
- buttonBarFlipper.setDisplayedChild(1);
}
}
@@ -754,14 +740,10 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi
if (currentPlaying != null) {
MusicDirectory.Entry song = currentPlaying.getSong();
songTitleTextView.setText(song.getTitle());
- albumTextView.setText(song.getAlbum());
- artistTextView.setText(song.getArtist());
getImageLoader().loadImage(albumArtImageView, song, true, true);
starButton.setImageResource(song.isStarred() ? android.R.drawable.btn_star_big_on : android.R.drawable.btn_star_big_off);
} else {
songTitleTextView.setText(null);
- albumTextView.setText(null);
- artistTextView.setText(null);
getImageLoader().loadImage(albumArtImageView, null, true, false);
starButton.setImageResource(android.R.drawable.btn_star_big_off);
}