[Android] Use new icons for popup features
Geoffrey Métais
git at videolan.org
Fri Apr 1 12:04:10 CEST 2016
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Apr 1 12:00:27 2016 +0200| [983558b2d81d92584efd1aae9f20b743c825b213] | committer: Geoffrey Métais
Use new icons for popup features
> https://code.videolan.org/videolan/vlc-android/commit/983558b2d81d92584efd1aae9f20b743c825b213
---
vlc-android/res/layout/video_popup.xml | 8 ++++----
.../org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java | 2 +-
.../src/org/videolan/vlc/gui/video/PopupManager.java | 15 +++++++--------
3 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/vlc-android/res/layout/video_popup.xml b/vlc-android/res/layout/video_popup.xml
index 6c7d4f9..24fed57 100644
--- a/vlc-android/res/layout/video_popup.xml
+++ b/vlc-android/res/layout/video_popup.xml
@@ -15,7 +15,7 @@
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
- android:src="@android:drawable/ic_menu_close_clear_cancel"
+ android:src="@drawable/ic_close"
android:visibility="gone" />
<ImageView
@@ -25,17 +25,17 @@
android:layout_alignParentTop="true"
android:layout_toLeftOf="@id/popup_close"
android:layout_marginRight="5dp"
- android:src="@android:drawable/ic_menu_set_as"
+ android:src="@drawable/ic_popup_expand"
android:visibility="gone" />
- <ImageButton
+ <ImageView
android:id="@+id/video_play_pause"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_below="@id/popup_expand"
- android:src="@drawable/ic_pause"
+ android:src="@drawable/ic_popup_pause"
android:visibility="gone" />
</RelativeLayout>
\ No newline at end of file
diff --git a/vlc-android/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java b/vlc-android/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java
index 0c65e5c..0ac7cdf 100644
--- a/vlc-android/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java
+++ b/vlc-android/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java
@@ -488,7 +488,7 @@ public class AdvOptionsDialog extends DialogFragment implements View.OnClickList
mAdapter.addOption(new Option(ID_SPU_DELAY, R.attr.ic_subtitledelay));
mAdapter.addOption(new Option(ID_AUDIO_DELAY, R.attr.ic_audiodelay));
if (!tvUi)
- mAdapter.addOption(new Option(ID_POPUP_VIDEO, R.attr.ic_playasaudio_on));
+ mAdapter.addOption(new Option(ID_POPUP_VIDEO, R.drawable.ic_popup_dim));
final MediaPlayer.Chapter[] chapters = mService.getChapters(-1);
final int chaptersCount = chapters != null ? chapters.length : 0;
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java b/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java
index 7ad47b7..47503a3 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java
@@ -45,7 +45,6 @@ import android.view.SurfaceView;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.view.WindowManager;
-import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.RelativeLayout;
@@ -75,7 +74,7 @@ public class PopupManager implements PlaybackService.Callback, GestureDetector.O
private SurfaceView mSurfaceView;
private ImageView mExpandButton;
private ImageView mCloseButton;
- private ImageButton mPlayPauseButton;
+ private ImageView mPlayPauseButton;
public PopupManager(PlaybackService service) {
mService = service;
@@ -100,7 +99,7 @@ public class PopupManager implements PlaybackService.Callback, GestureDetector.O
LayoutInflater li = (LayoutInflater) VLCApplication.getAppContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
mRootView = (RelativeLayout) li.inflate(R.layout.video_popup, null);
mSurfaceView = (SurfaceView) mRootView.findViewById(R.id.player_surface);
- mPlayPauseButton = (ImageButton) mRootView.findViewById(R.id.video_play_pause);
+ mPlayPauseButton = (ImageView) mRootView.findViewById(R.id.video_play_pause);
mCloseButton = (ImageView) mRootView.findViewById(R.id.popup_close);
mExpandButton = (ImageView) mRootView.findViewById(R.id.popup_expand);
mPlayPauseButton.setOnClickListener(this);
@@ -296,11 +295,11 @@ public class PopupManager implements PlaybackService.Callback, GestureDetector.O
mService.removePopup();
break;
case MediaPlayer.Event.Playing:
- mPlayPauseButton.setImageResource(R.drawable.ic_pause);
+ mPlayPauseButton.setImageResource(R.drawable.ic_popup_pause);
showNotification();
break;
case MediaPlayer.Event.Paused:
- mPlayPauseButton.setImageResource(R.drawable.ic_play);
+ mPlayPauseButton.setImageResource(R.drawable.ic_popup_play);
showNotification();
break;
}
@@ -391,10 +390,10 @@ public class PopupManager implements PlaybackService.Callback, GestureDetector.O
PendingIntent piPlay = PendingIntent.getBroadcast(mService, 0, new Intent(PlaybackService.ACTION_REMOTE_PLAYPAUSE), PendingIntent.FLAG_UPDATE_CURRENT);
if (mService.isPlaying())
- builder.addAction(R.drawable.ic_pause_w, mService.getString(R.string.pause), piPlay);
+ builder.addAction(R.drawable.ic_popup_pause, mService.getString(R.string.pause), piPlay);
else
- builder.addAction(R.drawable.ic_play_w, mService.getString(R.string.play), piPlay);
- builder.addAction(android.R.drawable.ic_menu_set_as, mService.getString(R.string.popup_expand), piExpand);
+ builder.addAction(R.drawable.ic_popup_play, mService.getString(R.string.play), piPlay);
+ builder.addAction(R.drawable.ic_popup_expand, mService.getString(R.string.popup_expand), piExpand);
Notification notification = builder.build();
mService.startService(new Intent(mService, PlaybackService.class));
More information about the Android
mailing list