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

Merge branch 'view-adjustment'

Wayne 5 лет назад
Родитель
Сommit
c49869aff1

+ 1 - 1
reader/src/main/java/com/kdanmobile/reader/ReaderActivity.kt

@@ -307,7 +307,7 @@ abstract class ReaderActivity : AppCompatActivity() {
     private fun onIsPageInBookmarksChanged(isPageInBookmarks: Boolean?) {
         isPageInBookmarks?.let {
             if (it) {
-                menuItemBookmark?.icon = ContextCompat.getDrawable(this, R.drawable.ic_bookmark)
+                menuItemBookmark?.icon = ContextCompat.getDrawable(this, R.drawable.ic_bookmark_fill)
             } else {
                 menuItemBookmark?.icon = ContextCompat.getDrawable(this, R.drawable.ic_bookmark_border)
             }

BIN
reader/src/main/res/drawable-hdpi/ic_bookmark.png


BIN
reader/src/main/res/drawable-hdpi/ic_bookmark_border.png


BIN
reader/src/main/res/drawable-xhdpi/ic_bookmark.png


BIN
reader/src/main/res/drawable-xhdpi/ic_bookmark_border.png


BIN
reader/src/main/res/drawable-xxhdpi/ic_bookmark.png


BIN
reader/src/main/res/drawable-xxhdpi/ic_bookmark_border.png


+ 1 - 1
reader/src/main/res/drawable-xhdpi/bg_reader_tool_bar_left.xml

@@ -35,7 +35,7 @@
                 android:right="2dp"
                 android:bottom="2dp"
                 />
-            <solid android:color="#dff5f5f5" />
+            <solid android:color="@color/reader_left_toolbar_bg" />
             <corners
                 android:topRightRadius="4dp"
                 android:bottomRightRadius="4dp"

+ 16 - 0
reader/src/main/res/drawable/bg_reader_tool_bar_left_expand.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <item>
+        <shape android:shape="rectangle">
+            <solid android:color="@color/reader_left_toolbar_bg" />
+        </shape>
+    </item>
+    <item android:right="-1dp" >
+        <shape>
+            <solid android:color="@android:color/transparent" />
+            <stroke
+                android:width="2dp"
+                android:color="#0E000000" />
+        </shape>
+    </item>
+</layer-list>

+ 1 - 1
reader/src/main/res/drawable/bg_reader_tool_bar_right.xml

@@ -35,7 +35,7 @@
                 android:left="2dp"
                 android:bottom="2dp"
                 />
-            <solid android:color="#dff5f5f5" />
+            <solid android:color="@color/reader_right_toolbar_bg" />
             <corners
                 android:topLeftRadius="4dp"
                 android:bottomLeftRadius="4dp"

+ 12 - 0
reader/src/main/res/drawable/ic_bookmark_border.xml

@@ -0,0 +1,12 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24">
+  <path
+      android:pathData="M17,3L7,3C5.9,3 5.01,3.9 5.01,5L5,21L12,18L19,21L19,5C19,3.9 18.1,3 17,3ZM17,18L12,15.82L7,18L7,5L17,5L17,18Z"
+      android:strokeWidth="1"
+      android:fillColor="#BC2D29"
+      android:fillType="evenOdd"
+      android:strokeColor="#00000000"/>
+</vector>

+ 12 - 0
reader/src/main/res/drawable/ic_bookmark_fill.xml

@@ -0,0 +1,12 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24">
+  <path
+      android:pathData="M17,3L7,3C5.9,3 5.01,3.9 5.01,5L5,21L12,18L19,21L19,5C19,3.9 18.1,3 17,3Z"
+      android:strokeWidth="1"
+      android:fillColor="#BC2D29"
+      android:fillType="evenOdd"
+      android:strokeColor="#00000000"/>
+</vector>

+ 2 - 2
reader/src/main/res/layout/activity_reader.xml

@@ -18,7 +18,7 @@
         android:layout_height="0dp" />
     <android.support.v7.widget.Toolbar
         android:id="@+id/toolbar_readerActivity"
-        android:background="@color/reader_toolbar_bg"
+        android:background="@color/reader_top_toolbar_bg"
         app:navigationIcon="@drawable/selector_arrow_back_black_blue_24dp"
         android:elevation="4dp"
         android:minHeight="?attr/actionBarSize"
@@ -58,7 +58,7 @@
                 app:layout_constraintLeft_toLeftOf="parent"
                 app:layout_constraintTop_toTopOf="parent"
                 app:layout_constraintBottom_toBottomOf="parent"
-                android:background="@drawable/bg_reader_tool_bar_left"
+                android:background="@drawable/bg_reader_tool_bar_left_expand"
                 android:orientation="vertical"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content" />

+ 4 - 2
reader/src/main/res/values/colors.xml

@@ -5,13 +5,15 @@
     <color name="black_38">#61000000</color>
     <color name="picton_blue">#30AFFD</color>
 
-    <color name="reader_toolbar_bg">#D0FFFFFF</color>
+    <color name="reader_top_toolbar_bg">#FFFFFF</color>
     <color name="reader_bottom_toolbar_bg">#FFFFFF</color>
+    <color name="reader_left_toolbar_bg">#FFFFFF</color>
+    <color name="reader_right_toolbar_bg">#FFFFFF</color>
     <color name="reader_media_box_bg">#FFFFFF</color>
     <color name="reader_toolbar_title_color">#E2000000</color>
     <color name="reader_bottom_toolbar_bottom_color_normal">#FFFFFF</color>
     <color name="reader_bottom_toolbar_bottom_color_press">@color/picton_blue</color>
-    <color name="reader_right_toolbar_selected_bg">#6633B5E5</color>
+    <color name="reader_right_toolbar_selected_bg">#1E000000</color>
 
     <color name="reader_annotation_color_1">#000000</color>
     <color name="reader_annotation_color_2">#296dd2</color>