[Android] Center title in history when no subtitle
Geoffrey Métais
git at videolan.org
Fri Jan 8 14:07:14 CET 2016
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Jan 8 13:49:46 2016 +0100| [83b91763b92a7f4b67b1ee047b9de57b941439e9] | committer: Geoffrey Métais
Center title in history when no subtitle
> https://code.videolan.org/videolan/vlc-android/commit/83b91763b92a7f4b67b1ee047b9de57b941439e9
---
vlc-android/res/layout/list_item.xml | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/vlc-android/res/layout/list_item.xml b/vlc-android/res/layout/list_item.xml
index 6368aab..ea9385d 100644
--- a/vlc-android/res/layout/list_item.xml
+++ b/vlc-android/res/layout/list_item.xml
@@ -28,19 +28,21 @@
android:layout_height="wrap_content"
android:src="@{media.type == MediaWrapper.TYPE_VIDEO ? @drawable/ic_browser_video_normal : @drawable/ic_browser_audio_normal}" />
- <LinearLayout
+ <RelativeLayout
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_above="@+id/subtitle"
android:layout_marginLeft="5dip"
android:layout_marginRight="5dip"
android:layout_marginTop="5dip"
android:text="@{media.title}"
+ android:gravity="center_vertical"
android:fontFamily="sans-serif-light"
android:textColor="?attr/list_title"
android:textSize="16sp"
@@ -54,13 +56,14 @@
android:layout_marginBottom="5dip"
android:layout_marginLeft="5dip"
android:layout_marginRight="5dip"
+ android:layout_alignParentBottom="true"
android:text="@{media.artist}"
android:fontFamily="sans-serif-light"
android:textColor="?attr/list_subtitle"
android:singleLine="true"
android:ellipsize="start"
android:visibility="@{media.artist == null ? View.GONE : View.VISIBLE}"/>
- </LinearLayout>
+ </RelativeLayout>
</LinearLayout>
</layout>
\ No newline at end of file
More information about the Android
mailing list