diff options
author | Scott Jackson <daneren2005@gmail.com> | 2013-01-03 19:02:50 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2013-01-03 19:02:50 -0800 |
commit | 2687e6127c4864ea002f8153b875e3be587aaf04 (patch) | |
tree | b0a6ed49a7d65f25470a90f9198a380fa9bcc5cd | |
parent | 1accc7b28e6feb9a833b56abf665e3e3e5afeef1 (diff) | |
download | dsub-2687e6127c4864ea002f8153b875e3be587aaf04.tar.gz dsub-2687e6127c4864ea002f8153b875e3be587aaf04.tar.bz2 dsub-2687e6127c4864ea002f8153b875e3be587aaf04.zip |
Added screen on/off menu in download tab while offline
-rw-r--r-- | subsonic-android/res/menu/nowplaying_offline.xml | 6 | ||||
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/subsonic-android/res/menu/nowplaying_offline.xml b/subsonic-android/res/menu/nowplaying_offline.xml index 677f654f..e3e85040 100644 --- a/subsonic-android/res/menu/nowplaying_offline.xml +++ b/subsonic-android/res/menu/nowplaying_offline.xml @@ -12,6 +12,12 @@ android:icon="@drawable/action_remove_all" android:title="@string/download.menu_remove_all" android:showAsAction="always|withText"/> + + <item + android:id="@+id/menu_screen_on_off" + android:icon="@drawable/action_screen_on_off" + android:title="@string/download.menu_screen_on" + android:showAsAction="ifRoom|withText"/> <item android:id="@+id/menu_toggle_timer" diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java index f035d3d2..ec50b09f 100644 --- a/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java +++ b/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java @@ -543,9 +543,9 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi if(getDownloadService() != null && getDownloadService().getSleepTimer()) { menu.findItem(R.id.menu_toggle_timer).setTitle(R.string.download_stop_timer); } - if(getDownloadService() != null && getDownloadService().getKeepScreenOn()) { - menu.findItem(R.id.menu_screen_on_off).setTitle(R.string.download_menu_screen_off); - } + } + if(getDownloadService() != null && getDownloadService().getKeepScreenOn()) { + menu.findItem(R.id.menu_screen_on_off).setTitle(R.string.download_menu_screen_off); } return true; } |