[Android] Audio items: fix single titles centering

Geoffrey Métais git at videolan.org
Thu Sep 6 16:16:26 CEST 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Sep  6 16:09:34 2018 +0200| [57c897ca6222770a7fae8d67da718ae98855aa6a] | committer: Geoffrey Métais

Audio items: fix single titles centering

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

 vlc-android/res/layout/audio_browser_item.xml | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/vlc-android/res/layout/audio_browser_item.xml b/vlc-android/res/layout/audio_browser_item.xml
index 955c84496..8f0d95347 100644
--- a/vlc-android/res/layout/audio_browser_item.xml
+++ b/vlc-android/res/layout/audio_browser_item.xml
@@ -41,7 +41,6 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:paddingStart="8dp"
-            android:paddingBottom="8dp"
             vlc:layout_constraintTop_toTopOf="parent"
             android:singleLine="true"
             android:text="@{header}"
@@ -56,9 +55,10 @@
             android:layout_height="@dimen/audio_browser_item_size"
             android:layout_width="0dp"
             vlc:layout_constraintDimensionRatio="1"
-            vlc:layout_constraintTop_toTopOf="@+id/title"
+            vlc:layout_constraintTop_toBottomOf="@+id/section_header"
             vlc:layout_constraintStart_toStartOf="parent"
             vlc:layout_constraintBottom_toBottomOf="parent"
+            android:layout_marginTop="8dp"
             android:layout_gravity="center"
             vlc:media="@{item}"
             android:background="@{cover}"
@@ -72,13 +72,11 @@
             android:layout_width="0dp"
             android:layout_height="wrap_content"
             vlc:layout_constraintVertical_chainStyle="packed"
-            vlc:layout_constraintTop_toBottomOf="@+id/section_header"
+            vlc:layout_constraintTop_toTopOf="@+id/media_cover"
             vlc:layout_constraintStart_toEndOf="@+id/media_cover"
             vlc:layout_constraintEnd_toStartOf="@+id/item_more"
             vlc:layout_constraintBottom_toTopOf="@+id/subtitle"
-            android:layout_marginTop="8dp"
             android:layout_marginStart="@dimen/default_margin"
-            android:layout_marginLeft="@dimen/default_margin"
             android:gravity="center_vertical"
             vlc:alignMode="@{alignMode}"
             android:text="@{item.title}"
@@ -91,7 +89,7 @@
             vlc:layout_constraintTop_toBottomOf="@+id/title"
             vlc:layout_constraintStart_toStartOf="@+id/title"
             vlc:layout_constraintEnd_toEndOf="@+id/title"
-            vlc:layout_constraintBottom_toBottomOf="parent"
+            vlc:layout_constraintBottom_toBottomOf="@id/media_cover"
             android:text="@{item.description}"
             style="@style/VLC.TextViewDescription"
             android:visibility="@{TextUtils.isEmpty(item.description) ? View.GONE : View.VISIBLE}"/>
@@ -99,10 +97,10 @@
         <ImageView
             android:id="@+id/item_more"
             android:layout_width="wrap_content"
-            android:layout_height="0dp"
+            android:layout_height="wrap_content"
             vlc:layout_constraintEnd_toEndOf="parent"
             vlc:layout_constraintTop_toTopOf="@+id/title"
-            vlc:layout_constraintBottom_toBottomOf="parent"
+            vlc:layout_constraintBottom_toBottomOf="@+id/subtitle"
             android:scaleType="center"
             android:src="@drawable/ic_more"
             android:contentDescription="@string/more_actions"



More information about the Android mailing list