Show EQ, Visualzier and Jukebox buttons if room
This commit is contained in:
parent
5ab323d4bf
commit
19839cfd0d
|
@ -2,7 +2,7 @@
|
||||||
<manifest xmlns:a="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
package="net.sourceforge.subsonic.androidapp"
|
package="net.sourceforge.subsonic.androidapp"
|
||||||
a:versionCode="47"
|
a:versionCode="47"
|
||||||
a:versionName="3.9.9.7" a:installLocation="auto">
|
a:versionName="3.9.9.8" a:installLocation="auto">
|
||||||
|
|
||||||
<uses-permission a:name="android.permission.INTERNET"/>
|
<uses-permission a:name="android.permission.INTERNET"/>
|
||||||
<uses-permission a:name="android.permission.READ_PHONE_STATE"/>
|
<uses-permission a:name="android.permission.READ_PHONE_STATE"/>
|
||||||
|
|
|
@ -3,16 +3,19 @@
|
||||||
|
|
||||||
<item
|
<item
|
||||||
a:id="@+id/download_equalizer"
|
a:id="@+id/download_equalizer"
|
||||||
|
a:showAsAction="ifRoom|withText"
|
||||||
a:title="@string/download.menu_equalizer"
|
a:title="@string/download.menu_equalizer"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<item
|
<item
|
||||||
a:id="@+id/download_visualizer"
|
a:id="@+id/download_visualizer"
|
||||||
|
a:showAsAction="ifRoom|withText"
|
||||||
a:title="@string/download.menu_visualizer"
|
a:title="@string/download.menu_visualizer"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<item
|
<item
|
||||||
a:id="@+id/download_jukebox"
|
a:id="@+id/download_jukebox"
|
||||||
|
a:showAsAction="ifRoom|withText"
|
||||||
a:title="@string/download.menu_jukebox"
|
a:title="@string/download.menu_jukebox"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
|
@ -290,7 +290,6 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi
|
||||||
visualizerAvailable = downloadService != null && downloadService.getVisualizerController() != null;
|
visualizerAvailable = downloadService != null && downloadService.getVisualizerController() != null;
|
||||||
equalizerAvailable = downloadService != null && downloadService.getEqualizerController() != null;
|
equalizerAvailable = downloadService != null && downloadService.getEqualizerController() != null;
|
||||||
|
|
||||||
|
|
||||||
if (visualizerAvailable) {
|
if (visualizerAvailable) {
|
||||||
visualizerView = new VisualizerView(this);
|
visualizerView = new VisualizerView(this);
|
||||||
visualizerViewLayout.addView(visualizerView, new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT));
|
visualizerViewLayout.addView(visualizerView, new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT));
|
||||||
|
@ -300,7 +299,7 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi
|
||||||
public boolean onTouch(View view, MotionEvent motionEvent) {
|
public boolean onTouch(View view, MotionEvent motionEvent) {
|
||||||
visualizerView.setActive(!visualizerView.isActive());
|
visualizerView.setActive(!visualizerView.isActive());
|
||||||
getDownloadService().setShowVisualization(visualizerView.isActive());
|
getDownloadService().setShowVisualization(visualizerView.isActive());
|
||||||
updateButtons();
|
//updateButtons();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -347,7 +346,7 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi
|
||||||
visualizerView.setActive(downloadService != null && downloadService.getShowVisualization());
|
visualizerView.setActive(downloadService != null && downloadService.getShowVisualization());
|
||||||
}
|
}
|
||||||
|
|
||||||
updateButtons();
|
//updateButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateButtons() {
|
private void updateButtons() {
|
||||||
|
@ -559,13 +558,13 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi
|
||||||
boolean active = !visualizerView.isActive();
|
boolean active = !visualizerView.isActive();
|
||||||
visualizerView.setActive(active);
|
visualizerView.setActive(active);
|
||||||
getDownloadService().setShowVisualization(visualizerView.isActive());
|
getDownloadService().setShowVisualization(visualizerView.isActive());
|
||||||
updateButtons();
|
//updateButtons();
|
||||||
Util.toast(DownloadActivity.this, active ? R.string.download_visualizer_on : R.string.download_visualizer_off);
|
Util.toast(DownloadActivity.this, active ? R.string.download_visualizer_on : R.string.download_visualizer_off);
|
||||||
return true;
|
return true;
|
||||||
case R.id.download_jukebox:
|
case R.id.download_jukebox:
|
||||||
boolean jukeboxEnabled = !getDownloadService().isJukeboxEnabled();
|
boolean jukeboxEnabled = !getDownloadService().isJukeboxEnabled();
|
||||||
getDownloadService().setJukeboxEnabled(jukeboxEnabled);
|
getDownloadService().setJukeboxEnabled(jukeboxEnabled);
|
||||||
updateButtons();
|
//updateButtons();
|
||||||
Util.toast(DownloadActivity.this, jukeboxEnabled ? R.string.download_jukebox_on : R.string.download_jukebox_off, false);
|
Util.toast(DownloadActivity.this, jukeboxEnabled ? R.string.download_jukebox_on : R.string.download_jukebox_off, false);
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue