From 1b56144d2b18f7330c0d79e847b52ceafdf53de6 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Sat, 8 Sep 2012 21:44:56 -0700 Subject: Revert "Revert "Started to work on move to ActionBarSherlock"" This reverts commit 00646f4aacd09c24d13170fe78bb144f1a98c4f6. --- subsonic-android/res/layout/main.xml | 6 ---- subsonic-android/res/layout/select_album.xml | 2 -- subsonic-android/res/layout/select_artist.xml | 2 -- subsonic-android/res/layout/select_playlist.xml | 2 -- subsonic-android/res/menu/main.xml | 38 +++++++++++++++---------- subsonic-android/res/menu/select_album.xml | 30 +++++++++++++++++++ subsonic-android/res/menu/select_artist.xml | 30 +++++++++++++++++++ subsonic-android/res/menu/select_playlist.xml | 24 ++++++++++++++++ subsonic-android/res/values/strings.xml | 4 +++ 9 files changed, 111 insertions(+), 27 deletions(-) create mode 100644 subsonic-android/res/menu/select_album.xml create mode 100644 subsonic-android/res/menu/select_artist.xml create mode 100644 subsonic-android/res/menu/select_playlist.xml (limited to 'subsonic-android/res') diff --git a/subsonic-android/res/layout/main.xml b/subsonic-android/res/layout/main.xml index e151f319..56b013fe 100644 --- a/subsonic-android/res/layout/main.xml +++ b/subsonic-android/res/layout/main.xml @@ -4,12 +4,6 @@ android:layout_width="fill_parent" android:layout_height="fill_parent"> - - - - - - - - + + + - + - + - + diff --git a/subsonic-android/res/menu/select_album.xml b/subsonic-android/res/menu/select_album.xml new file mode 100644 index 00000000..a5f2a3a9 --- /dev/null +++ b/subsonic-android/res/menu/select_album.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + diff --git a/subsonic-android/res/menu/select_artist.xml b/subsonic-android/res/menu/select_artist.xml new file mode 100644 index 00000000..42916622 --- /dev/null +++ b/subsonic-android/res/menu/select_artist.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + diff --git a/subsonic-android/res/menu/select_playlist.xml b/subsonic-android/res/menu/select_playlist.xml new file mode 100644 index 00000000..46d863cd --- /dev/null +++ b/subsonic-android/res/menu/select_playlist.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + diff --git a/subsonic-android/res/values/strings.xml b/subsonic-android/res/values/strings.xml index 7f9f6728..ea926fd9 100644 --- a/subsonic-android/res/values/strings.xml +++ b/subsonic-android/res/values/strings.xml @@ -33,6 +33,10 @@ Top rated Random + Search + Shuffle + Refresh + Play Exit Settings Help -- cgit v1.2.3 From 89ebb04737aeefefd5081c4157de90c735eab80c Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Sun, 9 Sep 2012 14:54:11 -0700 Subject: Removed Wheat theme + re-added back dynamic themeing to activities --- subsonic-android/AndroidManifest.xml | 2 +- subsonic-android/res/values/arrays.xml | 1 - subsonic-android/res/values/colors.xml | 4 ---- subsonic-android/res/values/styles.xml | 14 +++----------- subsonic-android/res/xml/settings.xml | 2 +- .../daneren2005/dsub/activity/SubsonicTabActivity.java | 11 ++++++----- 6 files changed, 11 insertions(+), 23 deletions(-) (limited to 'subsonic-android/res') diff --git a/subsonic-android/AndroidManifest.xml b/subsonic-android/AndroidManifest.xml index 04136ffc..ac786d26 100644 --- a/subsonic-android/AndroidManifest.xml +++ b/subsonic-android/AndroidManifest.xml @@ -18,7 +18,7 @@ - + - @string/settings.theme_wheat @string/settings.theme_light @string/settings.theme_dark diff --git a/subsonic-android/res/values/colors.xml b/subsonic-android/res/values/colors.xml index 69ab22a1..7a86d370 100644 --- a/subsonic-android/res/values/colors.xml +++ b/subsonic-android/res/values/colors.xml @@ -6,10 +6,6 @@ #FFFFFF #434343 #000000 - - #F1F0E6 - #494B26 - #830009 #8033b5e5 #ff0099cc diff --git a/subsonic-android/res/values/styles.xml b/subsonic-android/res/values/styles.xml index a970fe1b..9760bb0c 100644 --- a/subsonic-android/res/values/styles.xml +++ b/subsonic-android/res/values/styles.xml @@ -1,14 +1,6 @@ - - - - + + + diff --git a/subsonic-android/res/xml/settings.xml b/subsonic-android/res/xml/settings.xml index daa98b90..455a9dc0 100644 --- a/subsonic-android/res/xml/settings.xml +++ b/subsonic-android/res/xml/settings.xml @@ -109,7 +109,7 @@ diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicTabActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicTabActivity.java index 7d303a8d..03fcf357 100644 --- a/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicTabActivity.java +++ b/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicTabActivity.java @@ -67,9 +67,8 @@ public class SubsonicTabActivity extends SherlockActivity { @Override protected void onCreate(Bundle bundle) { setUncaughtExceptionHandler(); - // applyTheme(); + applyTheme(); super.onCreate(bundle); - // requestWindowFeature(Window.FEATURE_NO_TITLE); startService(new Intent(this, DownloadServiceImpl.class)); setVolumeControlStream(AudioManager.STREAM_MUSIC); } @@ -169,10 +168,12 @@ public class SubsonicTabActivity extends SherlockActivity { private void applyTheme() { String theme = Util.getTheme(this); if ("dark".equals(theme)) { - setTheme(android.R.style.Theme); + setTheme(R.style.Theme_DSub_Dark); } else if ("light".equals(theme)) { - setTheme(android.R.style.Theme_Light); - } + setTheme(R.style.Theme_DSub_Light); + } else { + setTheme(R.style.Theme_DSub_Light); + } } public boolean isDestroyed() { -- cgit v1.2.3 From 9fc7d00c27771367a0150a568b980de5c68a34a0 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Sun, 9 Sep 2012 15:49:05 -0700 Subject: Fixed theming --- subsonic-android/res/values/arrays.xml | 1 - 1 file changed, 1 deletion(-) (limited to 'subsonic-android/res') diff --git a/subsonic-android/res/values/arrays.xml b/subsonic-android/res/values/arrays.xml index e70b566f..aac7e74c 100644 --- a/subsonic-android/res/values/arrays.xml +++ b/subsonic-android/res/values/arrays.xml @@ -2,7 +2,6 @@ - wheat light dark -- cgit v1.2.3 From dae6e259f5a336df3b7a821ab9c05dd6e3df6bf4 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Sun, 9 Sep 2012 16:20:50 -0700 Subject: Themed ActionBar like old one --- subsonic-android/res/values/styles.xml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'subsonic-android/res') diff --git a/subsonic-android/res/values/styles.xml b/subsonic-android/res/values/styles.xml index 9760bb0c..bd76299a 100644 --- a/subsonic-android/res/values/styles.xml +++ b/subsonic-android/res/values/styles.xml @@ -1,6 +1,20 @@ - - - + + + + + -- cgit v1.2.3 From 8335fa5934a1afed90c2542e5749c4b46c54349d Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Sun, 9 Sep 2012 16:36:35 -0700 Subject: Converted SearchActivity --- subsonic-android/res/layout/action_bar.xml | 97 ---------------------- subsonic-android/res/layout/search.xml | 2 - subsonic-android/res/menu/search.xml | 24 ++++++ .../daneren2005/dsub/activity/SearchActivity.java | 62 +++++++------- 4 files changed, 55 insertions(+), 130 deletions(-) delete mode 100644 subsonic-android/res/layout/action_bar.xml create mode 100644 subsonic-android/res/menu/search.xml (limited to 'subsonic-android/res') diff --git a/subsonic-android/res/layout/action_bar.xml b/subsonic-android/res/layout/action_bar.xml deleted file mode 100644 index 2aaa4116..00000000 --- a/subsonic-android/res/layout/action_bar.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/subsonic-android/res/layout/search.xml b/subsonic-android/res/layout/search.xml index f65bcb36..5f5c26e0 100644 --- a/subsonic-android/res/layout/search.xml +++ b/subsonic-android/res/layout/search.xml @@ -4,8 +4,6 @@ android:layout_width="fill_parent" android:layout_height="fill_parent"> - - + + + + + + + + + + diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/SearchActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/SearchActivity.java index 3ea0cabf..4b9d844f 100644 --- a/subsonic-android/src/github/daneren2005/dsub/activity/SearchActivity.java +++ b/subsonic-android/src/github/daneren2005/dsub/activity/SearchActivity.java @@ -36,6 +36,7 @@ import android.widget.ListAdapter; import android.widget.ListView; import android.widget.TextView; import android.net.Uri; +import com.actionbarsherlock.view.Menu; import github.daneren2005.dsub.R; import github.daneren2005.dsub.domain.Artist; import github.daneren2005.dsub.domain.MusicDirectory; @@ -134,39 +135,38 @@ public class SearchActivity extends SubsonicTabActivity { } }); registerForContextMenu(list); + onNewIntent(getIntent()); + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + com.actionbarsherlock.view.MenuInflater inflater = getSupportMenuInflater(); + inflater.inflate(R.menu.search, menu); + return true; + } - // Button 1: gone - findViewById(R.id.action_button_1).setVisibility(View.GONE); - - // Button 2: search - final ImageButton actionSearchButton = (ImageButton)findViewById(R.id.action_button_2); - actionSearchButton.setImageResource(R.drawable.action_search); - actionSearchButton.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - onSearchRequested(); - } - }); - - // Button 3: Help - ImageButton actionHelpButton = (ImageButton)findViewById(R.id.action_button_3); - actionHelpButton.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - startActivity(new Intent(SearchActivity.this, HelpActivity.class)); - } - }); - - // Button 4: Settings - ImageButton actionSettingsButton = (ImageButton)findViewById(R.id.action_button_4); - actionSettingsButton.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - startActivity(new Intent(SearchActivity.this, SettingsActivity.class)); - } - }); + @Override + public boolean onOptionsItemSelected(com.actionbarsherlock.view.MenuItem item) { + Intent intent; + switch (item.getItemId()) { + case R.id.menu_search: + onSearchRequested(); + return true; + case R.id.menu_exit: + intent = new Intent(this, MainActivity.class); + intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); + intent.putExtra(Constants.INTENT_EXTRA_NAME_EXIT, true); + Util.startActivityWithoutTransition(this, intent); + return true; + case R.id.menu_settings: + startActivity(new Intent(this, SettingsActivity.class)); + return true; + case R.id.menu_help: + startActivity(new Intent(this, HelpActivity.class)); + return true; + } - onNewIntent(getIntent()); + return false; } @Override -- cgit v1.2.3 From 959c6551d2ca834c88813e775c1209565d95a3e1 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Sun, 9 Sep 2012 17:15:19 -0700 Subject: Added a full set of actionbar icons --- subsonic-android/res/drawable-hdpi-v4/action_browse.png | Bin 0 -> 1673 bytes subsonic-android/res/drawable-hdpi-v4/action_compass.png | Bin 0 -> 2069 bytes subsonic-android/res/drawable-hdpi-v4/action_exit.png | Bin 0 -> 923 bytes subsonic-android/res/drawable-hdpi-v4/action_home.png | Bin 0 -> 1814 bytes .../res/drawable-hdpi-v4/action_moreoverflow.png | Bin 0 -> 126 bytes subsonic-android/res/drawable-hdpi-v4/action_offline.png | Bin 0 -> 1558 bytes .../res/drawable-hdpi-v4/action_playlists.png | Bin 0 -> 1158 bytes .../res/drawable-hdpi-v4/action_remove_all.png | Bin 0 -> 1201 bytes subsonic-android/res/drawable-hdpi-v4/action_save.png | Bin 0 -> 1044 bytes .../res/drawable-hdpi-v4/action_screen_on_off.png | Bin 0 -> 1525 bytes .../res/drawable-hdpi-v4/action_select_artist_folder.png | Bin 0 -> 1920 bytes subsonic-android/res/drawable-hdpi-v4/action_share.png | Bin 0 -> 1823 bytes subsonic-android/res/drawable/action_help.png | Bin 1197 -> 0 bytes subsonic-android/res/drawable/action_play_all.png | Bin 1359 -> 0 bytes subsonic-android/res/drawable/action_refresh.png | Bin 1820 -> 0 bytes subsonic-android/res/drawable/action_search.png | Bin 1592 -> 0 bytes subsonic-android/res/drawable/action_settings.png | Bin 1649 -> 0 bytes subsonic-android/res/drawable/action_shuffle.png | Bin 1386 -> 0 bytes 18 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 subsonic-android/res/drawable-hdpi-v4/action_browse.png create mode 100644 subsonic-android/res/drawable-hdpi-v4/action_compass.png create mode 100644 subsonic-android/res/drawable-hdpi-v4/action_exit.png create mode 100644 subsonic-android/res/drawable-hdpi-v4/action_home.png create mode 100644 subsonic-android/res/drawable-hdpi-v4/action_moreoverflow.png create mode 100644 subsonic-android/res/drawable-hdpi-v4/action_offline.png create mode 100644 subsonic-android/res/drawable-hdpi-v4/action_playlists.png create mode 100644 subsonic-android/res/drawable-hdpi-v4/action_remove_all.png create mode 100644 subsonic-android/res/drawable-hdpi-v4/action_save.png create mode 100644 subsonic-android/res/drawable-hdpi-v4/action_screen_on_off.png create mode 100644 subsonic-android/res/drawable-hdpi-v4/action_select_artist_folder.png create mode 100644 subsonic-android/res/drawable-hdpi-v4/action_share.png delete mode 100644 subsonic-android/res/drawable/action_help.png delete mode 100644 subsonic-android/res/drawable/action_play_all.png delete mode 100644 subsonic-android/res/drawable/action_refresh.png delete mode 100644 subsonic-android/res/drawable/action_search.png delete mode 100644 subsonic-android/res/drawable/action_settings.png delete mode 100644 subsonic-android/res/drawable/action_shuffle.png (limited to 'subsonic-android/res') diff --git a/subsonic-android/res/drawable-hdpi-v4/action_browse.png b/subsonic-android/res/drawable-hdpi-v4/action_browse.png new file mode 100644 index 00000000..54296909 Binary files /dev/null and b/subsonic-android/res/drawable-hdpi-v4/action_browse.png differ diff --git a/subsonic-android/res/drawable-hdpi-v4/action_compass.png b/subsonic-android/res/drawable-hdpi-v4/action_compass.png new file mode 100644 index 00000000..39760f89 Binary files /dev/null and b/subsonic-android/res/drawable-hdpi-v4/action_compass.png differ diff --git a/subsonic-android/res/drawable-hdpi-v4/action_exit.png b/subsonic-android/res/drawable-hdpi-v4/action_exit.png new file mode 100644 index 00000000..09e18dee Binary files /dev/null and b/subsonic-android/res/drawable-hdpi-v4/action_exit.png differ diff --git a/subsonic-android/res/drawable-hdpi-v4/action_home.png b/subsonic-android/res/drawable-hdpi-v4/action_home.png new file mode 100644 index 00000000..3cec6246 Binary files /dev/null and b/subsonic-android/res/drawable-hdpi-v4/action_home.png differ diff --git a/subsonic-android/res/drawable-hdpi-v4/action_moreoverflow.png b/subsonic-android/res/drawable-hdpi-v4/action_moreoverflow.png new file mode 100644 index 00000000..cb6ebdaf Binary files /dev/null and b/subsonic-android/res/drawable-hdpi-v4/action_moreoverflow.png differ diff --git a/subsonic-android/res/drawable-hdpi-v4/action_offline.png b/subsonic-android/res/drawable-hdpi-v4/action_offline.png new file mode 100644 index 00000000..a85f0931 Binary files /dev/null and b/subsonic-android/res/drawable-hdpi-v4/action_offline.png differ diff --git a/subsonic-android/res/drawable-hdpi-v4/action_playlists.png b/subsonic-android/res/drawable-hdpi-v4/action_playlists.png new file mode 100644 index 00000000..e9e83e3d Binary files /dev/null and b/subsonic-android/res/drawable-hdpi-v4/action_playlists.png differ diff --git a/subsonic-android/res/drawable-hdpi-v4/action_remove_all.png b/subsonic-android/res/drawable-hdpi-v4/action_remove_all.png new file mode 100644 index 00000000..97b88837 Binary files /dev/null and b/subsonic-android/res/drawable-hdpi-v4/action_remove_all.png differ diff --git a/subsonic-android/res/drawable-hdpi-v4/action_save.png b/subsonic-android/res/drawable-hdpi-v4/action_save.png new file mode 100644 index 00000000..7bda97d6 Binary files /dev/null and b/subsonic-android/res/drawable-hdpi-v4/action_save.png differ diff --git a/subsonic-android/res/drawable-hdpi-v4/action_screen_on_off.png b/subsonic-android/res/drawable-hdpi-v4/action_screen_on_off.png new file mode 100644 index 00000000..c7168563 Binary files /dev/null and b/subsonic-android/res/drawable-hdpi-v4/action_screen_on_off.png differ diff --git a/subsonic-android/res/drawable-hdpi-v4/action_select_artist_folder.png b/subsonic-android/res/drawable-hdpi-v4/action_select_artist_folder.png new file mode 100644 index 00000000..c2cefead Binary files /dev/null and b/subsonic-android/res/drawable-hdpi-v4/action_select_artist_folder.png differ diff --git a/subsonic-android/res/drawable-hdpi-v4/action_share.png b/subsonic-android/res/drawable-hdpi-v4/action_share.png new file mode 100644 index 00000000..28376157 Binary files /dev/null and b/subsonic-android/res/drawable-hdpi-v4/action_share.png differ diff --git a/subsonic-android/res/drawable/action_help.png b/subsonic-android/res/drawable/action_help.png deleted file mode 100644 index aaf8304c..00000000 Binary files a/subsonic-android/res/drawable/action_help.png and /dev/null differ diff --git a/subsonic-android/res/drawable/action_play_all.png b/subsonic-android/res/drawable/action_play_all.png deleted file mode 100644 index 6ce5629a..00000000 Binary files a/subsonic-android/res/drawable/action_play_all.png and /dev/null differ diff --git a/subsonic-android/res/drawable/action_refresh.png b/subsonic-android/res/drawable/action_refresh.png deleted file mode 100644 index 9f30dc95..00000000 Binary files a/subsonic-android/res/drawable/action_refresh.png and /dev/null differ diff --git a/subsonic-android/res/drawable/action_search.png b/subsonic-android/res/drawable/action_search.png deleted file mode 100644 index 6bc3d426..00000000 Binary files a/subsonic-android/res/drawable/action_search.png and /dev/null differ diff --git a/subsonic-android/res/drawable/action_settings.png b/subsonic-android/res/drawable/action_settings.png deleted file mode 100644 index 1ab7722b..00000000 Binary files a/subsonic-android/res/drawable/action_settings.png and /dev/null differ diff --git a/subsonic-android/res/drawable/action_shuffle.png b/subsonic-android/res/drawable/action_shuffle.png deleted file mode 100644 index 0613965c..00000000 Binary files a/subsonic-android/res/drawable/action_shuffle.png and /dev/null differ -- cgit v1.2.3 From 5eadac48eb97f7480e2629e46a6159cdcb21e1a2 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Tue, 11 Sep 2012 21:36:52 -0700 Subject: Merged Play Now/Shuffle/Select All into action bar, updated help/settings/exist icons for all menus --- .../res/drawable-hdpi-v4/action_playlists.png | Bin 1158 -> 0 bytes .../res/drawable-hdpi-v4/action_select.png | Bin 0 -> 1158 bytes subsonic-android/res/layout/select_album.xml | 45 ++----------------- subsonic-android/res/menu/main.xml | 6 +-- subsonic-android/res/menu/select_album.xml | 18 ++++++-- subsonic-android/res/menu/select_artist.xml | 2 +- subsonic-android/res/menu/select_playlist.xml | 2 +- subsonic-android/res/values/strings.xml | 1 + .../dsub/activity/SelectAlbumActivity.java | 50 +++++++-------------- 9 files changed, 41 insertions(+), 83 deletions(-) delete mode 100644 subsonic-android/res/drawable-hdpi-v4/action_playlists.png create mode 100644 subsonic-android/res/drawable-hdpi-v4/action_select.png (limited to 'subsonic-android/res') diff --git a/subsonic-android/res/drawable-hdpi-v4/action_playlists.png b/subsonic-android/res/drawable-hdpi-v4/action_playlists.png deleted file mode 100644 index e9e83e3d..00000000 Binary files a/subsonic-android/res/drawable-hdpi-v4/action_playlists.png and /dev/null differ diff --git a/subsonic-android/res/drawable-hdpi-v4/action_select.png b/subsonic-android/res/drawable-hdpi-v4/action_select.png new file mode 100644 index 00000000..e9e83e3d Binary files /dev/null and b/subsonic-android/res/drawable-hdpi-v4/action_select.png differ diff --git a/subsonic-android/res/layout/select_album.xml b/subsonic-android/res/layout/select_album.xml index d5a4d0d1..59860e28 100644 --- a/subsonic-android/res/layout/select_album.xml +++ b/subsonic-android/res/layout/select_album.xml @@ -62,47 +62,8 @@ android:layout_width="0dp" android:layout_height="fill_parent" android:visibility="gone"/> - - - - - -