Kaynağa Gözat

Change ColorSelectView UI

cooperku_kdanmobile 5 yıl önce
ebeveyn
işleme
be196a833a

+ 1 - 1
reader/src/main/res/layout/activity_view_signature_create.xml

@@ -76,7 +76,7 @@
 
     <com.kdanmobile.reader.screen.view.ColorSelectView
         android:id="@+id/colorChooser_signature"
-        android:layout_width="wrap_content"
+        android:layout_width="0dp"
         android:layout_height="48dp"
         android:layout_marginLeft="16dp"
         android:layout_marginStart="16dp"

+ 17 - 22
reader/src/main/res/layout/view_color_select.xml

@@ -9,67 +9,62 @@
         android:id="@+id/colorSelect_column1"
         android:layout_width="24dp"
         android:layout_height="24dp"
-        app:color="#d0021b" />
+        app:color="#d0021b"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toLeftOf="@id/colorSelect_column2" />
 
     <com.kdanmobile.reader.screen.view.ColorOvalView
         android:id="@+id/colorSelect_column2"
         android:layout_width="24dp"
         android:layout_height="24dp"
-        android:layout_marginLeft="12dp"
-        android:layout_marginStart="12dp"
         app:color="#f5a623"
-        app:layout_constraintLeft_toRightOf="@id/colorSelect_column1" />
+        app:layout_constraintLeft_toRightOf="@id/colorSelect_column1"
+        app:layout_constraintRight_toLeftOf="@id/colorSelect_column3" />
 
     <com.kdanmobile.reader.screen.view.ColorOvalView
         android:id="@+id/colorSelect_column3"
         android:layout_width="24dp"
         android:layout_height="24dp"
-        android:layout_marginLeft="12dp"
-        android:layout_marginStart="12dp"
         app:color="#f8e71c"
-        app:layout_constraintLeft_toRightOf="@id/colorSelect_column2" />
+        app:layout_constraintLeft_toRightOf="@id/colorSelect_column2"
+        app:layout_constraintRight_toLeftOf="@id/colorSelect_column4" />
 
     <com.kdanmobile.reader.screen.view.ColorOvalView
         android:id="@+id/colorSelect_column4"
         android:layout_width="24dp"
         android:layout_height="24dp"
-        android:layout_marginLeft="12dp"
-        android:layout_marginStart="12dp"
         app:color="#8b572a"
-        app:layout_constraintLeft_toRightOf="@id/colorSelect_column3" />
+        app:layout_constraintLeft_toRightOf="@id/colorSelect_column3"
+        app:layout_constraintRight_toLeftOf="@id/colorSelect_column5" />
 
     <com.kdanmobile.reader.screen.view.ColorOvalView
         android:id="@+id/colorSelect_column5"
         android:layout_width="24dp"
         android:layout_height="24dp"
-        android:layout_marginLeft="12dp"
-        android:layout_marginStart="12dp"
         app:color="#7ed321"
-        app:layout_constraintLeft_toRightOf="@id/colorSelect_column4" />
+        app:layout_constraintLeft_toRightOf="@id/colorSelect_column4"
+        app:layout_constraintRight_toLeftOf="@id/colorSelect_column6" />
 
     <com.kdanmobile.reader.screen.view.ColorOvalView
         android:id="@+id/colorSelect_column6"
         android:layout_width="24dp"
         android:layout_height="24dp"
-        android:layout_marginLeft="12dp"
-        android:layout_marginStart="12dp"
         app:color="#417505"
-        app:layout_constraintLeft_toRightOf="@id/colorSelect_column5" />
+        app:layout_constraintLeft_toRightOf="@id/colorSelect_column5"
+        app:layout_constraintRight_toLeftOf="@id/colorSelect_column7" />
 
     <com.kdanmobile.reader.screen.view.ColorOvalView
         android:id="@+id/colorSelect_column7"
         android:layout_width="24dp"
         android:layout_height="24dp"
-        android:layout_marginLeft="12dp"
-        android:layout_marginStart="12dp"
         app:color="#4a90e2"
-        app:layout_constraintLeft_toRightOf="@id/colorSelect_column6" />
+        app:layout_constraintLeft_toRightOf="@id/colorSelect_column6"
+        app:layout_constraintRight_toLeftOf="@id/colorSelect_column8" />
 
     <com.kdanmobile.reader.screen.view.ColorOvalView
         android:id="@+id/colorSelect_column8"
         android:layout_width="24dp"
         android:layout_height="24dp"
-        android:layout_marginLeft="12dp"
-        android:layout_marginStart="12dp"
-        app:layout_constraintLeft_toRightOf="@id/colorSelect_column7" />
+        app:layout_constraintLeft_toRightOf="@id/colorSelect_column7"
+        app:layout_constraintRight_toRightOf="parent"/>
 </android.support.constraint.ConstraintLayout>

+ 1 - 1
reader/src/main/res/layout/view_viewer_edit_item_shape_border.xml

@@ -6,7 +6,7 @@
 
     <com.kdanmobile.reader.screen.view.ColorSelectView
         android:id="@+id/colorChooser_shapeBorder"
-        android:layout_width="wrap_content"
+        android:layout_width="0dp"
         android:layout_height="50dp"
         android:gravity="center"
         android:paddingTop="12dp"

+ 1 - 1
reader/src/main/res/layout/view_viewer_edit_item_shape_fill.xml

@@ -6,7 +6,7 @@
 
     <com.kdanmobile.reader.screen.view.ColorSelectView
         android:id="@+id/colorChooser_shapeFill"
-        android:layout_width="wrap_content"
+        android:layout_width="0dp"
         android:layout_height="50dp"
         android:gravity="center"
         android:paddingTop="12dp"

+ 1 - 1
reader/src/main/res/layout/view_viewer_edit_tab_text_box.xml

@@ -58,7 +58,7 @@
 
     <com.kdanmobile.reader.screen.view.ColorSelectView
         android:id="@+id/colorChooser_textBox"
-        android:layout_width="wrap_content"
+        android:layout_width="0dp"
         android:layout_height="48dp"
         android:gravity="center"
         android:paddingTop="12dp"