[Android] Rename binding variables to avoid collisions

Geoffrey Métais git at videolan.org
Tue Apr 19 17:07:52 CEST 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Apr 19 14:42:16 2016 +0200| [f4b63b13e503e7c6fa6f036f7c3d50abb6e00c19] | committer: Geoffrey Métais

Rename binding variables to avoid collisions

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

 vlc-android/res/layout/audio_browser_item.xml                     | 8 ++++----
 vlc-android/res/layout/extension_item_view.xml                    | 4 ++--
 vlc-android/src/org/videolan/vlc/gui/audio/AlbumAdapter.java      | 2 +-
 .../src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java   | 2 +-
 .../src/org/videolan/vlc/gui/browser/ExtensionAdapter.java        | 2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/vlc-android/res/layout/audio_browser_item.xml b/vlc-android/res/layout/audio_browser_item.xml
index 20d72a8..8749230 100644
--- a/vlc-android/res/layout/audio_browser_item.xml
+++ b/vlc-android/res/layout/audio_browser_item.xml
@@ -16,7 +16,7 @@
             name="cover"
             type="android.graphics.drawable.BitmapDrawable"/>
         <variable
-            name="footer"
+            name="hasFooter"
             type="boolean"/>
         <variable
             name="handler"
@@ -38,7 +38,7 @@
             android:layout_marginTop="10dp" >
 
             <ImageView
-                android:id="@+id/cover"
+                android:id="@+id/media_cover"
                 android:layout_width="@dimen/audio_browser_item_size"
                 android:layout_height="@dimen/audio_browser_item_size"
                 android:src="@{cover}"
@@ -48,7 +48,7 @@
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_toRightOf="@+id/cover"
+                android:layout_toRightOf="@+id/media_cover"
                 android:layout_toLeftOf="@+id/item_more"
                 android:paddingLeft="15dp"
                 android:layout_centerVertical="true"
@@ -98,7 +98,7 @@
             android:layout_width="match_parent"
             android:layout_height="1dp"
             android:background="?attr/item_footer"
-            android:visibility="@{footer ? View.VISIBLE : View.GONE}"/>
+            android:visibility="@{hasFooter ? View.VISIBLE : View.GONE}"/>
 
     </LinearLayout>
 </layout>
\ No newline at end of file
diff --git a/vlc-android/res/layout/extension_item_view.xml b/vlc-android/res/layout/extension_item_view.xml
index 9dcaf83..417a43f 100644
--- a/vlc-android/res/layout/extension_item_view.xml
+++ b/vlc-android/res/layout/extension_item_view.xml
@@ -9,7 +9,7 @@
             name="item"
             type="org.videolan.vlc.extensions.api.VLCExtensionItem"/>
         <variable
-            name="image"
+            name="imageDrawable"
             type="android.graphics.drawable.BitmapDrawable"/>
     </data>
 
@@ -25,7 +25,7 @@
             android:layout_height="60dp"
             android:layout_alignParentLeft="true"
             android:layout_marginRight="5dp"
-            android:src="@{image}"/>
+            android:src="@{imageDrawable}"/>
 
         <TextView
             android:id="@+id/title"
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AlbumAdapter.java b/vlc-android/src/org/videolan/vlc/gui/audio/AlbumAdapter.java
index 091bb31..9e25d8d 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AlbumAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AlbumAdapter.java
@@ -71,7 +71,7 @@ public class AlbumAdapter extends BaseAdapter implements IAudioClickHandler{
 
         holder.binding.setPosition(position);
         holder.binding.setMedia(mw);
-        holder.binding.setFooter(position != mMediaList.size() - 1);
+        holder.binding.setHasFooter(position != mMediaList.size() - 1);
         holder.binding.setClickable(mContextPopupMenuListener != null);
         holder.binding.setHandler(this);
         holder.binding.executePendingBindings();
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
index f9a324c..c94b809 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
@@ -376,7 +376,7 @@ public class AudioBrowserListAdapter extends BaseAdapter implements SectionIndex
         } else
             holder.binding.setVariable(BR.cover, AudioUtil.DEFAULT_COVER);
 
-        holder.binding.setVariable(BR.footer, !isMediaItemAboveASeparator(position));
+        holder.binding.setVariable(BR.hasFooter, !isMediaItemAboveASeparator(position));
         holder.binding.setVariable(BR.clickable, mContextPopupMenuListener != null);
         holder.binding.setVariable(BR.handler, this);
         holder.binding.executePendingBindings();
diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/ExtensionAdapter.java b/vlc-android/src/org/videolan/vlc/gui/browser/ExtensionAdapter.java
index 7d45f2e..e7aee8f 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/ExtensionAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/ExtensionAdapter.java
@@ -88,7 +88,7 @@ public class ExtensionAdapter extends RecyclerView.Adapter<ExtensionAdapter.View
         vh.binding.setItem(item);
         vh.binding.executePendingBindings();
         Resources res = holder.itemView.getContext().getResources();
-        vh.binding.setImage(new BitmapDrawable(res, BitmapFactory.decodeResource(res, getIconResId(item))));
+        vh.binding.setImageDrawable(new BitmapDrawable(res, BitmapFactory.decodeResource(res, getIconResId(item))));
         if (item.imageUri != null) {
             if (TextUtils.equals("http", item.imageUri.getScheme()))
                 AsyncImageLoader.LoadImage(new HttpImageLoader(item.getImageUri().toString(), holder.binding), null);



More information about the Android mailing list