[Android] XML cleaning

Geoffrey Métais git at videolan.org
Sun Jun 5 11:54:58 CEST 2016


vlc-android | branch: 2.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Sat Jun  4 16:27:02 2016 +0200| [849dd9c77d366f3cbdd4d900ed265b979bfe53a7] | committer: Geoffrey Métais

XML cleaning

(cherry picked from commit 180e9ec4904e736f54d04d4ecf6f1e912eb8974d)

> https://code.videolan.org/videolan/vlc-android/commit/849dd9c77d366f3cbdd4d900ed265b979bfe53a7
---

 vlc-android/res/layout/audio_browser_item.xml  | 2 +-
 vlc-android/res/layout/directory_view_item.xml | 6 +++---
 vlc-android/res/layout/extension_item_view.xml | 2 +-
 vlc-android/res/layout/list_item.xml           | 6 ++----
 vlc-android/res/layout/playlist_item.xml       | 4 ++--
 vlc-android/res/layout/video_grid_card.xml     | 4 ++--
 vlc-android/res/layout/video_list_card.xml     | 4 ++--
 vlc-android/res/layout/vlc_login_dialog.xml    | 4 ++--
 vlc-android/res/layout/vlc_progress_dialog.xml | 2 +-
 vlc-android/res/layout/vlc_question_dialog.xml | 6 +++---
 10 files changed, 19 insertions(+), 21 deletions(-)

diff --git a/vlc-android/res/layout/audio_browser_item.xml b/vlc-android/res/layout/audio_browser_item.xml
index 46cd170..9d9976b 100644
--- a/vlc-android/res/layout/audio_browser_item.xml
+++ b/vlc-android/res/layout/audio_browser_item.xml
@@ -100,7 +100,7 @@
                 android:contentDescription="@string/more_actions"
                 android:tag="@{position}"
                 android:visibility="@{clickable ? View.VISIBLE : View.GONE}"
-                android:onClick="@{handler.onMoreClick}"
+                android:onClick="@{handler::onMoreClick}"
                 android:clickable="@{clickable}" />
         </RelativeLayout>
 
diff --git a/vlc-android/res/layout/directory_view_item.xml b/vlc-android/res/layout/directory_view_item.xml
index 0f92df6..6a28285 100644
--- a/vlc-android/res/layout/directory_view_item.xml
+++ b/vlc-android/res/layout/directory_view_item.xml
@@ -39,7 +39,7 @@
         android:focusable="true"
         android:clickable="@{holder != null}"
         android:longClickable="@{hasContextMenu || storage != null}"
-        android:onClick="@{holder.onClick}"
+        android:onClick="@{holder::onClick}"
         android:background="@drawable/background_item">
 
         <CheckBox
@@ -52,7 +52,7 @@
             android:focusable="false"
             android:enabled="@{checkEnabled}"
             android:checked="@{checked}"
-            android:onClick="@{holder.onCheckBoxClick}"/>
+            android:onClick="@{holder::onCheckBoxClick}"/>
 
         <!-- Image downloading is handled by org.videolan.vlc.gui.helpers.AsyncImageLoader.downloadIcon() -->
         <TextView
@@ -114,7 +114,7 @@
             android:paddingLeft="10dp"
             android:background="@drawable/ic_more"
             android:visibility="@{hasContextMenu ? View.VISIBLE : View.GONE}"
-            android:onClick="@{holder.onMoreClick}"
+            android:onClick="@{holder::onMoreClick}"
             android:clickable="@{hasContextMenu}" />
 
     </LinearLayout>
diff --git a/vlc-android/res/layout/extension_item_view.xml b/vlc-android/res/layout/extension_item_view.xml
index 377edd5..6a40103 100644
--- a/vlc-android/res/layout/extension_item_view.xml
+++ b/vlc-android/res/layout/extension_item_view.xml
@@ -19,7 +19,7 @@
         android:layout_height="60dp"
         android:layout_margin="5dp"
         android:clickable="true"
-        android:onClick="@{holder.onClick}" >
+        android:onClick="@{holder::onClick}" >
         <ImageView
             android:id="@+id/extension_image"
             android:layout_width="wrap_content"
diff --git a/vlc-android/res/layout/list_item.xml b/vlc-android/res/layout/list_item.xml
index d534ffc..8ddbe80 100644
--- a/vlc-android/res/layout/list_item.xml
+++ b/vlc-android/res/layout/list_item.xml
@@ -23,7 +23,7 @@
         card_view:cardPreventCornerOverlap="false"
         card_view:cardUseCompatPadding="true"
         android:clickable="true"
-        android:onClick="@{holder.onClick}">
+        android:onClick="@{holder::onClick}">
         <LinearLayout
             android:background="?attr/background_default"
             android:id="@+id/layout_item"
@@ -32,9 +32,7 @@
             android:minHeight="70dp"
             android:layout_gravity="center_vertical"
             android:padding="5dp"
-            android:orientation="horizontal"
-            android:clickable="true"
-            android:onClick="@{holder.onClick}">
+            android:orientation="horizontal">
 
             <ImageView
                 android:id="@+id/icon"
diff --git a/vlc-android/res/layout/playlist_item.xml b/vlc-android/res/layout/playlist_item.xml
index 55f135e..219e828 100644
--- a/vlc-android/res/layout/playlist_item.xml
+++ b/vlc-android/res/layout/playlist_item.xml
@@ -26,7 +26,7 @@
         android:minHeight="40dp"
         android:layout_margin="5dip"
         android:clickable="true"
-        android:onClick="@{holder.onClick}" >
+        android:onClick="@{holder::onClick}" >
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
@@ -74,7 +74,7 @@
             android:layout_centerVertical="true"
             android:scaleType="center"
             android:background="@drawable/ic_more"
-            android:onClick="@{holder.onMoreClick}"
+            android:onClick="@{holder::onMoreClick}"
             android:clickable="true" />
     </RelativeLayout>
 </layout>
diff --git a/vlc-android/res/layout/video_grid_card.xml b/vlc-android/res/layout/video_grid_card.xml
index fcf0f4c..3544353 100644
--- a/vlc-android/res/layout/video_grid_card.xml
+++ b/vlc-android/res/layout/video_grid_card.xml
@@ -50,7 +50,7 @@
         android:longClickable="true"
         android:clickable="true"
         android:focusable="true"
-        android:onClick="@{holder.onClick}" >
+        android:onClick="@{holder::onClick}" >
 
         <LinearLayout
             android:background="?attr/background_default"
@@ -97,7 +97,7 @@
                     android:layout_height="wrap_content"
                     android:clickable="true"
                     android:contentDescription="@string/more_actions"
-                    android:onClick="@{holder.onMoreClick}"
+                    android:onClick="@{holder::onMoreClick}"
                     android:scaleType="fitCenter"
                     android:src="@drawable/ic_more" />
 
diff --git a/vlc-android/res/layout/video_list_card.xml b/vlc-android/res/layout/video_list_card.xml
index 7d08acf..71f8ffa 100644
--- a/vlc-android/res/layout/video_list_card.xml
+++ b/vlc-android/res/layout/video_list_card.xml
@@ -50,7 +50,7 @@
         vlc:cardUseCompatPadding="true"
         android:clickable="true"
         android:focusable="true"
-        android:onClick="@{holder.onClick}"
+        android:onClick="@{holder::onClick}"
         android:longClickable="true">
 
         <LinearLayout
@@ -99,7 +99,7 @@
                     android:layout_above="@+id/info_layout"
                     android:clickable="true"
                     android:contentDescription="@string/more_actions"
-                    android:onClick="@{holder.onMoreClick}"
+                    android:onClick="@{holder::onMoreClick}"
                     android:scaleType="fitCenter"
                     android:src="@drawable/ic_more" />
 
diff --git a/vlc-android/res/layout/vlc_login_dialog.xml b/vlc-android/res/layout/vlc_login_dialog.xml
index 39ba9d6..3f259b6 100644
--- a/vlc-android/res/layout/vlc_login_dialog.xml
+++ b/vlc-android/res/layout/vlc_login_dialog.xml
@@ -77,7 +77,7 @@
                 android:layout_below="@+id/warning"
                 android:layout_toLeftOf="@+id/action"
                 android:text="@android:string/cancel"
-                android:onClick="@{handler.onCancel}"
+                android:onClick="@{handler::onCancel}"
                 tools:targetApi="11"
                 style="?android:attr/borderlessButtonStyle" />
             <Button
@@ -87,7 +87,7 @@
                 android:layout_alignParentRight="true"
                 android:layout_below="@+id/warning"
                 android:text="@android:string/ok"
-                android:onClick="@{handler.onLogin}"
+                android:onClick="@{handler::onLogin}"
                 tools:targetApi="11"
                 style="?android:attr/borderlessButtonStyle" />
         </RelativeLayout>
diff --git a/vlc-android/res/layout/vlc_progress_dialog.xml b/vlc-android/res/layout/vlc_progress_dialog.xml
index 48992c6..a6eda6c 100644
--- a/vlc-android/res/layout/vlc_progress_dialog.xml
+++ b/vlc-android/res/layout/vlc_progress_dialog.xml
@@ -33,7 +33,7 @@
                 android:layout_below="@+id/progress"
                 android:text="@android:string/cancel"
                 android:layout_alignParentRight="true"
-                android:onClick="@{handler.onCancel}"
+                android:onClick="@{handler::onCancel}"
                 tools:targetApi="11"
                 style="?android:attr/borderlessButtonStyle"
                 android:visibility="@{TextUtils.isEmpty(dialog.cancelText) ? View.GONE : View.VISIBLE}"/>
diff --git a/vlc-android/res/layout/vlc_question_dialog.xml b/vlc-android/res/layout/vlc_question_dialog.xml
index f05d19d..2b3bb41 100644
--- a/vlc-android/res/layout/vlc_question_dialog.xml
+++ b/vlc-android/res/layout/vlc_question_dialog.xml
@@ -27,7 +27,7 @@
                 android:layout_below="@+id/text"
                 android:text="@android:string/cancel"
                 android:layout_toLeftOf="@+id/action1"
-                android:onClick="@{handler.onCancel}"
+                android:onClick="@{handler::onCancel}"
                 tools:targetApi="11"
                 style="?android:attr/borderlessButtonStyle" />
             <Button
@@ -38,7 +38,7 @@
                 android:layout_below="@+id/text"
                 android:text="@{dialog.action1Text}"
                 android:visibility="@{TextUtils.isEmpty(dialog.action1Text) ? View.GONE : View.VISIBLE}"
-                android:onClick="@{handler.onAction1}"
+                android:onClick="@{handler::onAction1}"
                 tools:targetApi="11"
                 style="?android:attr/borderlessButtonStyle" />
             <Button
@@ -49,7 +49,7 @@
                 android:layout_below="@+id/text"
                 android:text="@{dialog.action2Text}"
                 android:visibility="@{TextUtils.isEmpty(dialog.action2Text) ? View.GONE : View.VISIBLE}"
-                android:onClick="@{handler.onAction2}"
+                android:onClick="@{handler::onAction2}"
                 tools:targetApi="11"
                 style="?android:attr/borderlessButtonStyle" />
         </RelativeLayout>



More information about the Android mailing list