Просмотр исходного кода

Merge branch 'changeRowSwitchView' into 'master'

Change layout: the text in RowSwitchView should be on the left of the switch

See merge request kdanandroid/pdf/pdfreaderreadermodule!47
Wayne Huang 5 лет назад
Родитель
Сommit
4a7ba1251b
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      src/main/res/layout/view_row_switch.xml

+ 3 - 1
src/main/res/layout/view_row_switch.xml

@@ -9,7 +9,7 @@
     <TextView
         android:id="@+id/rowSwitchView_text"
         style="@style/Base.TextAppearance.Widget.AppCompat.Toolbar.Subtitle"
-        android:layout_width="wrap_content"
+        android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:layout_marginLeft="16dp"
         android:layout_marginStart="16dp"
@@ -17,6 +17,7 @@
         android:textSize="16sp"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toLeftOf="@id/rowSwitchView_switch"
         app:layout_constraintTop_toTopOf="parent" />
 
     <Switch
@@ -25,6 +26,7 @@
         android:layout_height="wrap_content"
         android:layout_marginEnd="16dp"
         android:layout_marginRight="16dp"
+        app:layout_constraintLeft_toRightOf="@id/rowSwitchView_text"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintRight_toRightOf="parent"
         app:layout_constraintTop_toTopOf="parent" />