[Android] Set widget layout clickable
Geoffrey Métais
git at videolan.org
Fri Jan 18 13:59:19 CET 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Jan 18 12:15:23 2019 +0100| [b9c346a429b7a3beaf33090b3a0adf9622824bec] | committer: Geoffrey Métais
Set widget layout clickable
> https://code.videolan.org/videolan/vlc-android/commit/b9c346a429b7a3beaf33090b3a0adf9622824bec
---
vlc-android/res/layout/widget_b.xml | 1 +
vlc-android/res/layout/widget_w.xml | 1 +
vlc-android/src/org/videolan/vlc/widget/VLCAppWidgetProvider.java | 1 +
3 files changed, 3 insertions(+)
diff --git a/vlc-android/res/layout/widget_b.xml b/vlc-android/res/layout/widget_b.xml
index f43fdac0c..2f40b843a 100644
--- a/vlc-android/res/layout/widget_b.xml
+++ b/vlc-android/res/layout/widget_b.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/widget_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
diff --git a/vlc-android/res/layout/widget_w.xml b/vlc-android/res/layout/widget_w.xml
index f3463cb2c..2ef187280 100644
--- a/vlc-android/res/layout/widget_w.xml
+++ b/vlc-android/res/layout/widget_w.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/widget_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
diff --git a/vlc-android/src/org/videolan/vlc/widget/VLCAppWidgetProvider.java b/vlc-android/src/org/videolan/vlc/widget/VLCAppWidgetProvider.java
index 02a7ba7bc..6128345d9 100644
--- a/vlc-android/src/org/videolan/vlc/widget/VLCAppWidgetProvider.java
+++ b/vlc-android/src/org/videolan/vlc/widget/VLCAppWidgetProvider.java
@@ -100,6 +100,7 @@ abstract public class VLCAppWidgetProvider extends AppWidgetProvider {
views.setOnClickPendingIntent(R.id.stop, piStop);
views.setOnClickPendingIntent(R.id.forward, piForward);
views.setOnClickPendingIntent(R.id.cover, piVlc);
+ views.setOnClickPendingIntent(R.id.widget_container, piVlc);
if (TextUtils.getLayoutDirectionFromLocale(Locale.getDefault()) == View.LAYOUT_DIRECTION_RTL) {
final boolean black = this instanceof VLCAppWidgetProviderBlack;
views.setImageViewResource(R.id.forward, black ? R.drawable.ic_widget_previous_w : R.drawable.ic_widget_previous);
More information about the Android
mailing list