aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Hardin <kurthardin.dev@gmail.com>2012-09-25 09:39:52 -0700
committerKurt Hardin <kurthardin.dev@gmail.com>2012-09-25 09:39:52 -0700
commit72c741b2f3dd35c68c8a81f7d786de673e94f434 (patch)
tree1a9a389bd81e3bf52872d8c23b5b86b5a452fda8
parentcd37c559ec052361a921009fd3e9c632cb01389f (diff)
downloaddsub-72c741b2f3dd35c68c8a81f7d786de673e94f434.tar.gz
dsub-72c741b2f3dd35c68c8a81f7d786de673e94f434.tar.bz2
dsub-72c741b2f3dd35c68c8a81f7d786de673e94f434.zip
Added 'Starred' section to MainActivity.
-rw-r--r--subsonic-android/res/layout/main_buttons.xml12
-rw-r--r--subsonic-android/res/values/strings.xml1
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java5
3 files changed, 17 insertions, 1 deletions
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
@@ -103,6 +103,18 @@
android:paddingRight="6dip"
android:minHeight="50dip"/>
<TextView
+ android:id="@+id/main_albums_starred"
+ android:text="@string/main.albums_starred"
+ android:drawableRight="@drawable/list_item_artist"
+ android:drawablePadding="6dip"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:gravity="center_vertical"
+ android:paddingLeft="6dip"
+ android:paddingRight="6dip"
+ android:minHeight="50dip"/>
+ <TextView
android:id="@+id/main_albums_random"
android:text="@string/main.albums_random"
android:drawableRight="@drawable/list_item_artist"
diff --git a/subsonic-android/res/values/strings.xml b/subsonic-android/res/values/strings.xml
index eef510e4..08407a96 100644
--- a/subsonic-android/res/values/strings.xml
+++ b/subsonic-android/res/values/strings.xml
@@ -31,6 +31,7 @@
<string name="main.albums_recent">Recently played</string>
<string name="main.albums_frequent">Most played</string>
<string name="main.albums_highest">Top rated</string>
+ <string name="main.albums_starred">Starred</string>
<string name="main.albums_random">Random</string>
<string name="menu.exit">Exit</string>
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) {