Procházet zdrojové kódy

alter bottom toolbar

remove bookmark
add media box
Wayne před 5 roky
rodič
revize
8523caeca7

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

@@ -352,23 +352,10 @@ abstract class ReaderActivity : AppCompatActivity() {
     }
 
     private fun setupBottomToolbar() {
-        val context = this
-        /** Set buttons color **/
-        val normalColor = R.color.reader_bottom_toolbar_bottom_color_normal
-        val pressColor = R.color.reader_bottom_toolbar_bottom_color_press
-        Utils.setTintDrawableList(context, ib_readerActivity_bottomToolbarPrevious, R.drawable.ic_chevron_left, normalColor, pressColor)
-        Utils.setTintDrawableList(context, ib_readerActivity_bottomToolbarNext, R.drawable.ic_chevron_right, normalColor, pressColor)
-        Utils.setTintDrawableList(context, ib_readerActivity_bottomToolbarBookmark, R.drawable.ic_bookmark_border, normalColor, pressColor)
-        Utils.setTintDrawableList(context, ib_readerActivity_bottomToolbarViewAll, R.drawable.ic_view_all, normalColor, pressColor)
-        Utils.setTintDrawableList(context, ib_readerActivity_bottomToolbarKdanCloud, R.drawable.ic_kdan_cloud, normalColor, pressColor)
+        ib_readerActivity_bottomToolbarMediaBox.setOnClickListener { viewerEditView.visibility = View.VISIBLE }
     }
 
     private fun setupViewerEditView() {
-
-        ib_readerActivity_bottomToolbarKdanCloud.setOnClickListener {
-            viewerEditView.visibility = View.VISIBLE
-        }
-
         viewerEditView.apply {
             onViewerEditTabAddButtonClickListener = object : ViewerEditView.OnViewerEditTabAddButtonClickListener {
                 override fun onTabTextBoxAddButtonClick(textBoxTabView: TextBoxTabView) {

binární
reader/src/main/res/drawable-hdpi/ic_chevron_left.png


binární
reader/src/main/res/drawable-hdpi/ic_chevron_right.png


binární
reader/src/main/res/drawable-hdpi/ic_kdan_cloud.png


binární
reader/src/main/res/drawable-hdpi/ic_view_all.png


binární
reader/src/main/res/drawable-xhdpi/ic_chevron_left.png


binární
reader/src/main/res/drawable-xhdpi/ic_chevron_right.png


binární
reader/src/main/res/drawable-xhdpi/ic_kdan_cloud.png


binární
reader/src/main/res/drawable-xhdpi/ic_view_all.png


binární
reader/src/main/res/drawable-xxhdpi/ic_chevron_left.png


binární
reader/src/main/res/drawable-xxhdpi/ic_chevron_right.png


binární
reader/src/main/res/drawable-xxhdpi/ic_kdan_cloud.png


binární
reader/src/main/res/drawable-xxhdpi/ic_view_all.png


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 7 - 0
reader/src/main/res/drawable/ic_kdancloud.xml


+ 14 - 0
reader/src/main/res/drawable/ic_next.xml

@@ -0,0 +1,14 @@
+<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="M10,6l-1.41,1.41l4.58,4.59l-4.58,4.59l1.41,1.41l6,-6z"
+      android:strokeAlpha="0.6"
+      android:strokeWidth="1"
+      android:fillColor="#000000"
+      android:fillType="evenOdd"
+      android:strokeColor="#00000000"
+      android:fillAlpha="0.6"/>
+</vector>

+ 14 - 0
reader/src/main/res/drawable/ic_prev.xml

@@ -0,0 +1,14 @@
+<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="M15.41,7.41l-1.41,-1.41l-6,6l6,6l1.41,-1.41l-4.58,-4.59z"
+      android:strokeAlpha="0.6"
+      android:strokeWidth="1"
+      android:fillColor="#000000"
+      android:fillType="evenOdd"
+      android:strokeColor="#00000000"
+      android:fillAlpha="0.6"/>
+</vector>

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 13 - 0
reader/src/main/res/drawable/ic_share.xml


+ 13 - 0
reader/src/main/res/drawable/ic_viewall.xml

@@ -0,0 +1,13 @@
+<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="M4,11L4,4L11,4L11,11L4,11ZM4,13L11,13L11,20L4,20L4,13ZM20,11L13,11L13,4L20,4L20,11ZM20,13L20,20L13,20L13,13L20,13Z"
+      android:strokeWidth="1"
+      android:fillColor="#000000"
+      android:fillAlpha="0.6"
+      android:fillType="nonZero"
+      android:strokeColor="#00000000"/>
+</vector>

+ 13 - 0
reader/src/main/res/drawable/ic_work.xml

@@ -0,0 +1,13 @@
+<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="M14,6L14,4L10,4L10,6L14,6ZM4,8L4,19L20,19L20,8L4,8ZM20,6C21.11,6 22,6.89 22,8L22,19C22,20.11 21.11,21 20,21L4,21C2.89,21 2,20.11 2,19L2.01,8C2.01,6.89 2.89,6 4,6L8,6L8,4C8,2.89 8.89,2 10,2L14,2C15.11,2 16,2.89 16,4L16,6L20,6Z"
+      android:strokeWidth="1"
+      android:fillColor="#000000"
+      android:fillAlpha="0.6"
+      android:fillType="nonZero"
+      android:strokeColor="#00000000"/>
+</vector>

+ 22 - 14
reader/src/main/res/layout/activity_reader.xml

@@ -242,7 +242,7 @@
     </com.kdanmobile.reader.HorizontalView>
     <android.support.constraint.ConstraintLayout
         android:id="@+id/viewGroup_readerActivity_bottomToolbar"
-        android:background="@color/black_54"
+        android:background="@color/reader_bottom_toolbar_bg"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintRight_toRightOf="parent"
         app:layout_constraintBottom_toBottomOf="parent"
@@ -251,36 +251,44 @@
         <android.support.v7.widget.AppCompatImageButton
             android:id="@+id/ib_readerActivity_bottomToolbarPrevious"
             style="@style/ReaderBottomToolbarImageButton"
-            android:src="@drawable/ic_chevron_left"
+            android:src="@drawable/ic_prev"
             app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toLeftOf="@id/ib_readerActivity_bottomToolbarNext"
+            app:layout_constraintRight_toLeftOf="@id/ib_readerActivity_bottomToolbarShare"
+            app:layout_constraintHorizontal_chainStyle="spread"
             />
         <android.support.v7.widget.AppCompatImageButton
-            android:id="@+id/ib_readerActivity_bottomToolbarNext"
+            android:id="@+id/ib_readerActivity_bottomToolbarShare"
             style="@style/ReaderBottomToolbarImageButton"
-            android:src="@drawable/ic_chevron_right"
+            android:src="@drawable/ic_share"
             app:layout_constraintLeft_toRightOf="@id/ib_readerActivity_bottomToolbarPrevious"
-            app:layout_constraintRight_toLeftOf="@id/ib_readerActivity_bottomToolbarBookmark"
+            app:layout_constraintRight_toLeftOf="@id/ib_readerActivity_bottomToolbarKdanCloud"
             />
         <android.support.v7.widget.AppCompatImageButton
-            android:id="@+id/ib_readerActivity_bottomToolbarBookmark"
+            android:id="@+id/ib_readerActivity_bottomToolbarKdanCloud"
             style="@style/ReaderBottomToolbarImageButton"
-            android:src="@drawable/ic_bookmark_border"
-            app:layout_constraintLeft_toRightOf="@id/ib_readerActivity_bottomToolbarNext"
+            android:src="@drawable/ic_kdancloud"
+            app:layout_constraintLeft_toRightOf="@id/ib_readerActivity_bottomToolbarShare"
             app:layout_constraintRight_toLeftOf="@id/ib_readerActivity_bottomToolbarViewAll"
             />
         <android.support.v7.widget.AppCompatImageButton
             android:id="@+id/ib_readerActivity_bottomToolbarViewAll"
             style="@style/ReaderBottomToolbarImageButton"
-            android:src="@drawable/ic_view_all"
-            app:layout_constraintLeft_toRightOf="@id/ib_readerActivity_bottomToolbarBookmark"
-            app:layout_constraintRight_toLeftOf="@id/ib_readerActivity_bottomToolbarKdanCloud"
+            android:src="@drawable/ic_viewall"
+            app:layout_constraintLeft_toRightOf="@id/ib_readerActivity_bottomToolbarKdanCloud"
+            app:layout_constraintRight_toLeftOf="@id/ib_readerActivity_bottomToolbarMediaBox"
             />
         <android.support.v7.widget.AppCompatImageButton
-            android:id="@+id/ib_readerActivity_bottomToolbarKdanCloud"
+            android:id="@+id/ib_readerActivity_bottomToolbarMediaBox"
             style="@style/ReaderBottomToolbarImageButton"
-            android:src="@drawable/ic_kdan_cloud"
+            android:src="@drawable/ic_work"
             app:layout_constraintLeft_toRightOf="@id/ib_readerActivity_bottomToolbarViewAll"
+            app:layout_constraintRight_toLeftOf="@id/ib_readerActivity_bottomToolbarNext"
+            />
+        <android.support.v7.widget.AppCompatImageButton
+            android:id="@+id/ib_readerActivity_bottomToolbarNext"
+            style="@style/ReaderBottomToolbarImageButton"
+            android:src="@drawable/ic_next"
+            app:layout_constraintLeft_toRightOf="@id/ib_readerActivity_bottomToolbarMediaBox"
             app:layout_constraintRight_toRightOf="parent"
             />
     </android.support.constraint.ConstraintLayout>

+ 1 - 0
reader/src/main/res/values/colors.xml

@@ -6,6 +6,7 @@
     <color name="picton_blue">#30AFFD</color>
 
     <color name="reader_toolbar_bg">#D0FFFFFF</color>
+    <color name="reader_bottom_toolbar_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>