From 72c741b2f3dd35c68c8a81f7d786de673e94f434 Mon Sep 17 00:00:00 2001 From: Kurt Hardin Date: Tue, 25 Sep 2012 09:39:52 -0700 Subject: Added 'Starred' section to MainActivity. --- subsonic-android/res/layout/main_buttons.xml | 12 ++++++++++++ subsonic-android/res/values/strings.xml | 1 + .../src/github/daneren2005/dsub/activity/MainActivity.java | 5 ++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/subsonic-android/res/layout/main_buttons.xml b/subsonic-android/res/layout/main_buttons.xml index 969ad99e..a532c233 100644 --- a/subsonic-android/res/layout/main_buttons.xml +++ b/subsonic-android/res/layout/main_buttons.xml @@ -102,6 +102,18 @@ android:paddingLeft="6dip" android:paddingRight="6dip" android:minHeight="50dip"/> + Recently played Most played Top rated + Starred Random Exit diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java index e5958e57..ff5c29c1 100644 --- a/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java +++ b/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java @@ -79,6 +79,7 @@ public class MainActivity extends SubsonicTabActivity { final View albumsHighestButton = buttons.findViewById(R.id.main_albums_highest); final View albumsRecentButton = buttons.findViewById(R.id.main_albums_recent); final View albumsFrequentButton = buttons.findViewById(R.id.main_albums_frequent); + final View albumsStarredButton = buttons.findViewById(R.id.main_albums_starred); final View dummyView = findViewById(R.id.main_dummy); @@ -92,7 +93,7 @@ public class MainActivity extends SubsonicTabActivity { adapter.addViews(Arrays.asList(serverButton), true); if (!Util.isOffline(this)) { adapter.addView(albumsTitle, false); - adapter.addViews(Arrays.asList(albumsNewestButton, albumsRandomButton, albumsHighestButton, albumsRecentButton, albumsFrequentButton), true); + adapter.addViews(Arrays.asList(albumsNewestButton, albumsRandomButton, albumsHighestButton, albumsStarredButton, albumsRecentButton, albumsFrequentButton), true); } list.setAdapter(adapter); registerForContextMenu(dummyView); @@ -108,6 +109,8 @@ public class MainActivity extends SubsonicTabActivity { showAlbumList("random"); } else if (view == albumsHighestButton) { showAlbumList("highest"); + } else if (view == albumsStarredButton) { + showAlbumList("starred"); } else if (view == albumsRecentButton) { showAlbumList("recent"); } else if (view == albumsFrequentButton) { -- cgit v1.2.3