From a6c4c6c90fb853c8c2a0eceb00226753fec4a450 Mon Sep 17 00:00:00 2001 From: Christopher Eby Date: Fri, 28 Oct 2011 01:06:52 -0500 Subject: [PATCH] Rework library controls layout Use two rows of text and show all controls below text --- res/layout/library_controls.xml | 130 ++++++++++----------- res/values-nb/translatable.xml | 1 - res/values-sk/translatable.xml | 1 - res/values/translatable.xml | 1 - src/org/kreed/vanilla/LibraryActivity.java | 14 ++- 5 files changed, 73 insertions(+), 74 deletions(-) diff --git a/res/layout/library_controls.xml b/res/layout/library_controls.xml index 3caa053d..03477518 100644 --- a/res/layout/library_controls.xml +++ b/res/layout/library_controls.xml @@ -20,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --> - - - - - - - - - + android:orientation="vertical"> + + + + + + + + + - \ No newline at end of file + diff --git a/res/values-nb/translatable.xml b/res/values-nb/translatable.xml index 5cedb6ce..f5f53654 100644 --- a/res/values-nb/translatable.xml +++ b/res/values-nb/translatable.xml @@ -76,7 +76,6 @@ THE SOFTWARE. Ingen Ukjent - %1$s etter %2$s Soill Alt Kø Alt Alle Låter diff --git a/res/values-sk/translatable.xml b/res/values-sk/translatable.xml index 2add15eb..6609e624 100644 --- a/res/values-sk/translatable.xml +++ b/res/values-sk/translatable.xml @@ -80,7 +80,6 @@ THE SOFTWARE. Nič Neznáme - %1$s od %2$s Prehrať všetko Pridať do zoznamu všetko Všetky skladby diff --git a/res/values/translatable.xml b/res/values/translatable.xml index d6a4d376..2b054e2f 100644 --- a/res/values/translatable.xml +++ b/res/values/translatable.xml @@ -84,7 +84,6 @@ THE SOFTWARE. None Unknown - %1$s by %2$s Play All Enqueue All All Songs diff --git a/src/org/kreed/vanilla/LibraryActivity.java b/src/org/kreed/vanilla/LibraryActivity.java index ef807c0e..6c7da057 100644 --- a/src/org/kreed/vanilla/LibraryActivity.java +++ b/src/org/kreed/vanilla/LibraryActivity.java @@ -83,7 +83,8 @@ public class LibraryActivity private View mClearButton; private View mControls; - private TextView mStatusText; + private TextView mTitle; + private TextView mArtist; private ImageView mCover; private ViewGroup mLimiterViews; @@ -124,7 +125,8 @@ public class LibraryActivity mControls = findViewById(R.id.controls); - mStatusText = (TextView)mControls.findViewById(R.id.status_text); + mTitle = (TextView)mControls.findViewById(R.id.title); + mArtist = (TextView)mControls.findViewById(R.id.artist); mCover = (ImageView)mControls.findViewById(R.id.cover); View previous = mControls.findViewById(R.id.previous); mPlayPauseButton = (ImageButton)mControls.findViewById(R.id.play_pause); @@ -873,16 +875,18 @@ public class LibraryActivity { super.onSongChange(song); - if (mStatusText != null) { + if (mTitle != null) { Uri cover = null; if (song == null) { - mStatusText.setText(R.string.none); + mTitle.setText(R.string.none); + mArtist.setText(null); } else { Resources res = getResources(); String title = song.title == null ? res.getString(R.string.unknown) : song.title; String artist = song.artist == null ? res.getString(R.string.unknown) : song.artist; - mStatusText.setText(res.getString(R.string.title_by_artist, title, artist)); + mTitle.setText(title); + mArtist.setText(artist); cover = song.hasCover(this) ? song.getCoverUri() : null; }