Переглянути джерело

Merge branch 'adjust-setting'

Wayne 5 роки тому
батько
коміт
c47d7fbae1

+ 40 - 7
reader/src/main/res/layout/activity_reader_setting.xml

@@ -6,6 +6,8 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:theme="@style/ReaderSettingActivityTheme"
+    android:background="@android:color/white"
     tools:context=".setting.ReaderSettingActivity">
 
     <android.support.v7.widget.Toolbar
@@ -44,22 +46,39 @@
             <com.kdanmobile.reader.screen.view.RowSwitchView
                 android:id="@+id/rowSwitchView_smartCrop"
                 android:layout_width="0dp"
-                android:layout_height="48dp"
-                android:layout_marginTop="24dp"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="38dp"
                 app:layout_constraintLeft_toLeftOf="parent"
                 app:layout_constraintRight_toRightOf="parent"
                 app:layout_constraintTop_toBottomOf="@+id/readingModeSelectView"
                 app:text="@string/viewer_setting_switch_smart_crop" />
 
+            <View
+                android:id="@+id/view_readerSetting_dividerSmartCropStatusBar"
+                style="@style/ReaderSettingActivityDivider"
+                app:layout_constraintTop_toBottomOf="@id/rowSwitchView_smartCrop"
+                app:layout_constraintBottom_toTopOf="@id/rowSwitchView_showStateBar"
+                android:layout_marginTop="12dp"
+                />
+
             <com.kdanmobile.reader.screen.view.RowSwitchView
                 android:id="@+id/rowSwitchView_showStateBar"
                 android:layout_width="0dp"
-                android:layout_height="48dp"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="12dp"
                 app:layout_constraintLeft_toLeftOf="parent"
                 app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toBottomOf="@+id/rowSwitchView_smartCrop"
+                app:layout_constraintTop_toBottomOf="@+id/view_readerSetting_dividerSmartCropStatusBar"
                 app:text="@string/viewer_setting_switch_show_state_bar" />
 
+            <View
+                android:id="@+id/view_readerSetting_dividerStatusBarPageModeSelect"
+                style="@style/ReaderSettingActivityDivider"
+                app:layout_constraintTop_toBottomOf="@id/rowSwitchView_showStateBar"
+                app:layout_constraintBottom_toTopOf="@id/turnPageModeSelectView"
+                android:layout_marginTop="12dp"
+                />
+
             <com.kdanmobile.reader.screen.view.TurnPageModeSelectView
                 android:id="@+id/turnPageModeSelectView"
                 android:layout_width="0dp"
@@ -67,7 +86,14 @@
                 android:layout_marginTop="24dp"
                 app:layout_constraintLeft_toLeftOf="parent"
                 app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toBottomOf="@+id/rowSwitchView_showStateBar" />
+                app:layout_constraintTop_toBottomOf="@id/view_readerSetting_dividerStatusBarPageModeSelect" />
+
+            <View
+                android:id="@+id/view_readerSetting_dividerPageModeSelectScreenSetting"
+                style="@style/ReaderSettingActivityDivider"
+                app:layout_constraintTop_toBottomOf="@id/turnPageModeSelectView"
+                android:layout_marginTop="12dp"
+                />
 
             <com.kdanmobile.reader.screen.view.ScreenSettingView
                 android:id="@+id/screenSettingView"
@@ -76,7 +102,14 @@
                 android:layout_marginTop="24dp"
                 app:layout_constraintLeft_toLeftOf="parent"
                 app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toBottomOf="@+id/turnPageModeSelectView" />
+                app:layout_constraintTop_toBottomOf="@+id/view_readerSetting_dividerPageModeSelectScreenSetting" />
+
+            <View
+                android:id="@+id/view_readerSetting_dividerScreenSettingToolbarSetting"
+                style="@style/ReaderSettingActivityDivider"
+                app:layout_constraintTop_toBottomOf="@id/screenSettingView"
+                android:layout_marginTop="12dp"
+                />
 
             <com.kdanmobile.reader.screen.view.ToolbarSettingView
                 android:id="@+id/toolbarSettingView"
@@ -85,7 +118,7 @@
                 android:layout_marginTop="24dp"
                 app:layout_constraintLeft_toLeftOf="parent"
                 app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toBottomOf="@+id/screenSettingView" />
+                app:layout_constraintTop_toBottomOf="@+id/view_readerSetting_dividerScreenSettingToolbarSetting" />
 
         </android.support.constraint.ConstraintLayout>
     </ScrollView>

+ 4 - 0
reader/src/main/res/layout/view_reading_mode_select.xml

@@ -7,6 +7,7 @@
     <TextView
         android:id="@+id/tv_readingMode"
         style="@style/Base.TextAppearance.AppCompat.Body1"
+        android:gravity="center_vertical"
         android:layout_width="0dp"
         android:layout_height="48dp"
         android:layout_marginEnd="16dp"
@@ -21,6 +22,7 @@
         android:id="@+id/btn_readingMode_day"
         android:layout_width="48dp"
         android:layout_height="48dp"
+        android:layout_marginTop="8dp"
         android:layout_marginLeft="16dp"
         android:layout_marginStart="16dp"
         android:background="#0000"
@@ -33,6 +35,7 @@
         android:id="@+id/btn_readingMode_lilac"
         android:layout_width="48dp"
         android:layout_height="48dp"
+        android:layout_marginTop="8dp"
         android:layout_marginLeft="24dp"
         android:layout_marginStart="24dp"
         android:background="#0000"
@@ -45,6 +48,7 @@
         android:id="@+id/btn_readingMode_night"
         android:layout_width="48dp"
         android:layout_height="48dp"
+        android:layout_marginTop="8dp"
         android:layout_marginLeft="24dp"
         android:layout_marginStart="24dp"
         android:background="#0000"

+ 9 - 2
reader/src/main/res/layout/view_turn_page_mode_select.xml

@@ -40,13 +40,20 @@
 
     </RadioGroup>
 
+    <View
+        android:id="@+id/view_turnPageModeView_dividerModeSwitch"
+        style="@style/ReaderSettingActivityDivider"
+        android:layout_marginTop="12dp"
+        app:layout_constraintTop_toBottomOf="@id/radioGroup_turnPageMode" />
+
     <com.kdanmobile.reader.screen.view.RowSwitchView
         android:id="@+id/rowSwitchView_showTurnPageBtn"
         android:layout_width="0dp"
-        android:layout_height="48dp"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="12dp"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/radioGroup_turnPageMode"
+        app:layout_constraintTop_toBottomOf="@id/view_turnPageModeView_dividerModeSwitch"
         app:text="@string/viewer_setting_page_turn_button_visible" />
 
 </android.support.constraint.ConstraintLayout>

+ 10 - 0
reader/src/main/res/values/styles.xml

@@ -37,4 +37,14 @@
         <item name="android:layout_height">48dp</item>
         <item name="android:padding">6dp</item>
     </style>
+    <style name="ReaderSettingActivityTheme" parent="Theme.AppCompat.Light.DarkActionBar">
+        <item name="colorAccent">@color/bright_blue</item>
+    </style>
+    <style name="ReaderSettingActivityDivider">
+        <item name="layout_constraintLeft_toLeftOf">parent</item>
+        <item name="layout_constraintRight_toRightOf">parent</item>
+        <item name="android:layout_width">0dp</item>
+        <item name="android:layout_height">1dp</item>
+        <item name="android:background">#1e000000</item>
+    </style>
 </resources>