[Android] Add Barrier to align info texts

Geoffrey Métais git at videolan.org
Thu Jun 8 14:12:58 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jun  8 13:33:08 2017 +0200| [0a28c330f2c674f23b5cac9ff6a907dd84058aab] | committer: Geoffrey Métais

Add Barrier to align info texts

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

 vlc-android/res/layout/info_activity.xml | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/vlc-android/res/layout/info_activity.xml b/vlc-android/res/layout/info_activity.xml
index 035072a03..93cbba071 100644
--- a/vlc-android/res/layout/info_activity.xml
+++ b/vlc-android/res/layout/info_activity.xml
@@ -124,7 +124,7 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 vlc:layout_constraintTop_toBottomOf="@+id/info_path"
-                vlc:layout_constraintStart_toEndOf="@+id/length_title"
+                vlc:layout_constraintStart_toStartOf="@+id/barrier"
                 android:visibility="@{length != null ? View.VISIBLE : View.INVISIBLE}"
                 android:layout_margin="@dimen/half_default_margin"
                 android:textColor="?attr/font_light"
@@ -144,11 +144,19 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 vlc:layout_constraintTop_toBottomOf="@+id/length_title"
-                vlc:layout_constraintStart_toEndOf="@+id/size_title"
+                vlc:layout_constraintStart_toStartOf="@+id/barrier"
                 android:layout_margin="@dimen/half_default_margin"
                 android:textColor="?attr/font_light"
                 android:text="@{sizeValue}"
                 android:visibility="@{sizeValue != null ? View.VISIBLE : View.INVISIBLE}" />
+            <android.support.constraint.Barrier
+                android:id="@+id/barrier"
+                android:layout_width="0dp"
+                android:layout_height="0dp"
+                vlc:layout_constraintTop_toTopOf="@id/length_title"
+                vlc:layout_constraintBottom_toBottomOf="@id/size_title"
+                vlc:barrierDirection="end"
+                vlc:constraint_referenced_ids="size_title, length_title"/>
             <TextView
                 android:id="@+id/extra_title"
                 android:layout_width="wrap_content"



More information about the Android mailing list