[Android] Hide track buttons when there's no track to select
Sébastien Toque
git at videolan.org
Tue Oct 16 21:01:10 CEST 2012
vlc-ports/android | branch: master | Sébastien Toque <xilasz at gmail.com> | Tue Oct 16 21:01:03 2012 +0200| [c21113e39e67ed059f656932dbc4c3e2e9ac5f05] | committer: Sébastien Toque
Hide track buttons when there's no track to select
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=c21113e39e67ed059f656932dbc4c3e2e9ac5f05
---
.../org/videolan/vlc/gui/video/VideoPlayerActivity.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 65e87c7..857a9f3 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -216,9 +216,9 @@ public class VideoPlayerActivity extends Activity {
mControlContainer.addView((View) mControls);
mAudioTrack = (ImageButton) findViewById(R.id.player_overlay_audio);
- mAudioTrack.setEnabled(false);
+ mAudioTrack.setVisibility(View.GONE);
mSubtitle = (ImageButton) findViewById(R.id.player_overlay_subtitle);
- mSubtitle.setEnabled(false);
+ mSubtitle.setVisibility(View.GONE);
mHandler.postDelayed(new Runnable() {
@Override
@@ -1164,10 +1164,10 @@ public class VideoPlayerActivity extends Activity {
if (mAudioTracksLibVLC != null && mAudioTracksLibVLC.length > 1) {
mAudioTracksAdapter = new ArrayAdapter<String>(this, R.layout.list_item_checkable, mAudioTracksLibVLC);
mAudioTrack.setOnClickListener(mAudioTrackListener);
- mAudioTrack.setEnabled(true);
+ mAudioTrack.setVisibility(View.VISIBLE);
}
else {
- mAudioTrack.setEnabled(false);
+ mAudioTrack.setVisibility(View.GONE);
mAudioTrack.setOnClickListener(null);
}
}
@@ -1176,11 +1176,11 @@ public class VideoPlayerActivity extends Activity {
if (mSubtitleTracksLibVLC != null && mSubtitleTracksLibVLC.length > 0) {
mSubtitleTracksAdapter = new ArrayAdapter<String>(this, R.layout.list_item_checkable, mSubtitleTracksLibVLC);
mSubtitle.setOnClickListener(mSubtitlesListener);
- mSubtitle.setEnabled(true);
+ mSubtitle.setVisibility(View.VISIBLE);
}
else {
- mSubtitle.setEnabled(false);
+ mSubtitle.setVisibility(View.GONE);
mSubtitle.setOnClickListener(null);
}
}
More information about the Android
mailing list