[Android] Fix MediaInfo tracks display

Geoffrey Métais git at videolan.org
Fri Jan 8 17:15:54 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Jan  8 17:15:16 2016 +0100| [a39ac8b09ee84c5d333b4cf5a3f28b738903b06f] | committer: Geoffrey Métais

Fix MediaInfo tracks display

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

 vlc-android/res/layout/info_item.xml               | 47 ++++++++++++++++++++++
 .../videolan/vlc/gui/video/MediaInfoAdapter.java   |  2 +-
 2 files changed, 48 insertions(+), 1 deletion(-)

diff --git a/vlc-android/res/layout/info_item.xml b/vlc-android/res/layout/info_item.xml
new file mode 100644
index 0000000..5094c28
--- /dev/null
+++ b/vlc-android/res/layout/info_item.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/layout_item"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:layout_gravity="center_vertical"
+    android:orientation="horizontal"
+    android:clickable="true" >
+
+    <ImageView
+        android:id="@+id/icon"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content" />
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical" >
+
+        <TextView
+            android:id="@+id/title"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="5dip"
+            android:layout_marginRight="5dip"
+            android:layout_marginTop="5dip"
+            android:gravity="center_vertical"
+            android:fontFamily="sans-serif-light"
+            android:textColor="?attr/list_title"
+            android:textSize="16sp"
+            android:singleLine="true"
+            android:scrollHorizontally="true"/>
+
+        <TextView
+            android:id="@+id/subtitle"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginBottom="5dip"
+            android:layout_marginLeft="5dip"
+            android:layout_marginRight="5dip"
+            android:fontFamily="sans-serif-light"
+            android:textColor="?attr/list_subtitle"
+            android:singleLine="true"
+            android:ellipsize="start" />
+    </LinearLayout>
+
+</LinearLayout>
\ No newline at end of file
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoAdapter.java b/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoAdapter.java
index a7a29bd..e436248 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoAdapter.java
@@ -43,7 +43,7 @@ public class MediaInfoAdapter extends ArrayAdapter<Media.Track> {
         View v = convertView;
         if (v == null) {
             LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-            v = inflater.inflate(R.layout.list_item, parent, false);
+            v = inflater.inflate(R.layout.info_item, parent, false);
             holder = new ViewHolder();
             holder.title = (TextView) v.findViewById(R.id.title);
             holder.text = (TextView) v.findViewById(R.id.subtitle);



More information about the Android mailing list