Sfoglia il codice sorgente

Change right toolbar icons

Wayne 5 anni fa
parent
commit
8ca08dd13d
32 ha cambiato i file con 86 aggiunte e 34 eliminazioni
  1. 11 11
      reader/src/main/java/com/kdanmobile/reader/ReaderActivity.kt
  2. BIN
      reader/src/main/res/drawable-hdpi/ic_tool_freehand_s1.png
  3. BIN
      reader/src/main/res/drawable-hdpi/ic_tool_freehand_s10.png
  4. BIN
      reader/src/main/res/drawable-hdpi/ic_tool_freehand_s2.png
  5. BIN
      reader/src/main/res/drawable-hdpi/ic_tool_freehand_s3.png
  6. BIN
      reader/src/main/res/drawable-hdpi/ic_tool_freehand_s4.png
  7. BIN
      reader/src/main/res/drawable-hdpi/ic_tool_freehand_s5.png
  8. BIN
      reader/src/main/res/drawable-hdpi/ic_tool_freehand_s6.png
  9. BIN
      reader/src/main/res/drawable-hdpi/ic_tool_freehand_s7.png
  10. BIN
      reader/src/main/res/drawable-hdpi/ic_tool_freehand_s8.png
  11. BIN
      reader/src/main/res/drawable-hdpi/ic_tool_freehand_s9.png
  12. BIN
      reader/src/main/res/drawable-hdpi/ic_tool_setting_h.png
  13. BIN
      reader/src/main/res/drawable-hdpi/ic_tool_settings.png
  14. BIN
      reader/src/main/res/drawable-hdpi/ic_tool_text.png
  15. 0 8
      reader/src/main/res/drawable-hdpi/selector_tool_settings.xml
  16. BIN
      reader/src/main/res/drawable-xhdpi/ic_tool_ink.png
  17. BIN
      reader/src/main/res/drawable-xhdpi/ic_tool_setting_h.png
  18. BIN
      reader/src/main/res/drawable-xhdpi/ic_tool_settings.png
  19. BIN
      reader/src/main/res/drawable-xhdpi/ic_tool_text.png
  20. 6 0
      reader/src/main/res/drawable/ic_reader_right_toolbar_ink_color1.xml
  21. 6 0
      reader/src/main/res/drawable/ic_reader_right_toolbar_ink_color10.xml
  22. 6 0
      reader/src/main/res/drawable/ic_reader_right_toolbar_ink_color2.xml
  23. 6 0
      reader/src/main/res/drawable/ic_reader_right_toolbar_ink_color3.xml
  24. 6 0
      reader/src/main/res/drawable/ic_reader_right_toolbar_ink_color4.xml
  25. 6 0
      reader/src/main/res/drawable/ic_reader_right_toolbar_ink_color5.xml
  26. 6 0
      reader/src/main/res/drawable/ic_reader_right_toolbar_ink_color6.xml
  27. 6 0
      reader/src/main/res/drawable/ic_reader_right_toolbar_ink_color7.xml
  28. 6 0
      reader/src/main/res/drawable/ic_reader_right_toolbar_ink_color8.xml
  29. 6 0
      reader/src/main/res/drawable/ic_reader_right_toolbar_ink_color9.xml
  30. 5 0
      reader/src/main/res/drawable/ic_reader_right_toolbar_settings.xml
  31. 5 0
      reader/src/main/res/drawable/ic_reader_right_toolbar_text.xml
  32. 5 15
      reader/src/main/res/layout/activity_reader.xml

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

@@ -200,18 +200,18 @@ abstract class ReaderActivity : AppCompatActivity() {
         AnnotationColor.values().forEach {
             if (resources.getColor(it.colorResId) == color) {
                 val drawableResId = when (it) {
-                    AnnotationColor.Color1 -> R.drawable.ic_tool_freehand_s1
-                    AnnotationColor.Color2 -> R.drawable.ic_tool_freehand_s2
-                    AnnotationColor.Color3 -> R.drawable.ic_tool_freehand_s3
-                    AnnotationColor.Color4 -> R.drawable.ic_tool_freehand_s4
-                    AnnotationColor.Color5 -> R.drawable.ic_tool_freehand_s5
-                    AnnotationColor.Color6 -> R.drawable.ic_tool_freehand_s6
-                    AnnotationColor.Color7 -> R.drawable.ic_tool_freehand_s7
-                    AnnotationColor.Color8 -> R.drawable.ic_tool_freehand_s8
-                    AnnotationColor.Color9 -> R.drawable.ic_tool_freehand_s9
-                    AnnotationColor.Color10 -> R.drawable.ic_tool_freehand_s10
+                    AnnotationColor.Color1 -> R.drawable.ic_reader_right_toolbar_ink_color1
+                    AnnotationColor.Color2 -> R.drawable.ic_reader_right_toolbar_ink_color2
+                    AnnotationColor.Color3 -> R.drawable.ic_reader_right_toolbar_ink_color3
+                    AnnotationColor.Color4 -> R.drawable.ic_reader_right_toolbar_ink_color4
+                    AnnotationColor.Color5 -> R.drawable.ic_reader_right_toolbar_ink_color5
+                    AnnotationColor.Color6 -> R.drawable.ic_reader_right_toolbar_ink_color6
+                    AnnotationColor.Color7 -> R.drawable.ic_reader_right_toolbar_ink_color7
+                    AnnotationColor.Color8 -> R.drawable.ic_reader_right_toolbar_ink_color8
+                    AnnotationColor.Color9 -> R.drawable.ic_reader_right_toolbar_ink_color9
+                    AnnotationColor.Color10 -> R.drawable.ic_reader_right_toolbar_ink_color10
                 }
-                iv_readerActivity_inkStroke.setImageResource(drawableResId)
+                iv_readerActivity_ink.setImageResource(drawableResId)
                 return
             }
         }

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


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


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


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


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


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


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


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


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


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


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


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


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


+ 0 - 8
reader/src/main/res/drawable-hdpi/selector_tool_settings.xml

@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <item android:drawable="@drawable/ic_tool_setting_h" android:state_pressed="true"/>
-    <item android:drawable="@drawable/ic_tool_setting_h" android:state_enabled="true" android:state_focused="true"/>
-    <item android:drawable="@drawable/ic_tool_settings"/>
-
-</selector>

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


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


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


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


+ 6 - 0
reader/src/main/res/drawable/ic_reader_right_toolbar_ink_color1.xml

@@ -0,0 +1,6 @@
+<vector android:alpha="0.6" android:height="24dp"
+    android:viewportHeight="24.0" android:viewportWidth="24.0"
+    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#FF000000" android:pathData="M17.75,7L14,3.25l-10,10L4,17h3.75l10,-10zM20.71,4.04c0.39,-0.39 0.39,-1.02 0,-1.41L18.37,0.29c-0.39,-0.39 -1.02,-0.39 -1.41,0L15,2.25 18.75,6l1.96,-1.96z"/>
+    <path android:fillColor="#000000" android:pathData="M0,20h24v4H0z"/>
+</vector>

+ 6 - 0
reader/src/main/res/drawable/ic_reader_right_toolbar_ink_color10.xml

@@ -0,0 +1,6 @@
+<vector android:alpha="0.6" android:height="24dp"
+    android:viewportHeight="24.0" android:viewportWidth="24.0"
+    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#FF000000" android:pathData="M17.75,7L14,3.25l-10,10L4,17h3.75l10,-10zM20.71,4.04c0.39,-0.39 0.39,-1.02 0,-1.41L18.37,0.29c-0.39,-0.39 -1.02,-0.39 -1.41,0L15,2.25 18.75,6l1.96,-1.96z"/>
+    <path android:fillColor="#ffffff" android:pathData="M0,20h24v4H0z"/>
+</vector>

+ 6 - 0
reader/src/main/res/drawable/ic_reader_right_toolbar_ink_color2.xml

@@ -0,0 +1,6 @@
+<vector android:alpha="0.6" android:height="24dp"
+    android:viewportHeight="24.0" android:viewportWidth="24.0"
+    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#FF000000" android:pathData="M17.75,7L14,3.25l-10,10L4,17h3.75l10,-10zM20.71,4.04c0.39,-0.39 0.39,-1.02 0,-1.41L18.37,0.29c-0.39,-0.39 -1.02,-0.39 -1.41,0L15,2.25 18.75,6l1.96,-1.96z"/>
+    <path android:fillColor="#296dd2" android:pathData="M0,20h24v4H0z"/>
+</vector>

+ 6 - 0
reader/src/main/res/drawable/ic_reader_right_toolbar_ink_color3.xml

@@ -0,0 +1,6 @@
+<vector android:alpha="0.6" android:height="24dp"
+    android:viewportHeight="24.0" android:viewportWidth="24.0"
+    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#FF000000" android:pathData="M17.75,7L14,3.25l-10,10L4,17h3.75l10,-10zM20.71,4.04c0.39,-0.39 0.39,-1.02 0,-1.41L18.37,0.29c-0.39,-0.39 -1.02,-0.39 -1.41,0L15,2.25 18.75,6l1.96,-1.96z"/>
+    <path android:fillColor="#57d214" android:pathData="M0,20h24v4H0z"/>
+</vector>

+ 6 - 0
reader/src/main/res/drawable/ic_reader_right_toolbar_ink_color4.xml

@@ -0,0 +1,6 @@
+<vector android:alpha="0.6" android:height="24dp"
+    android:viewportHeight="24.0" android:viewportWidth="24.0"
+    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#FF000000" android:pathData="M17.75,7L14,3.25l-10,10L4,17h3.75l10,-10zM20.71,4.04c0.39,-0.39 0.39,-1.02 0,-1.41L18.37,0.29c-0.39,-0.39 -1.02,-0.39 -1.41,0L15,2.25 18.75,6l1.96,-1.96z"/>
+    <path android:fillColor="#ff7e00" android:pathData="M0,20h24v4H0z"/>
+</vector>

+ 6 - 0
reader/src/main/res/drawable/ic_reader_right_toolbar_ink_color5.xml

@@ -0,0 +1,6 @@
+<vector android:alpha="0.6" android:height="24dp"
+    android:viewportHeight="24.0" android:viewportWidth="24.0"
+    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#FF000000" android:pathData="M17.75,7L14,3.25l-10,10L4,17h3.75l10,-10zM20.71,4.04c0.39,-0.39 0.39,-1.02 0,-1.41L18.37,0.29c-0.39,-0.39 -1.02,-0.39 -1.41,0L15,2.25 18.75,6l1.96,-1.96z"/>
+    <path android:fillColor="#ff7e00" android:pathData="M0,20h24v4H0z"/>
+</vector>

+ 6 - 0
reader/src/main/res/drawable/ic_reader_right_toolbar_ink_color6.xml

@@ -0,0 +1,6 @@
+<vector android:alpha="0.6" android:height="24dp"
+    android:viewportHeight="24.0" android:viewportWidth="24.0"
+    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#FF000000" android:pathData="M17.75,7L14,3.25l-10,10L4,17h3.75l10,-10zM20.71,4.04c0.39,-0.39 0.39,-1.02 0,-1.41L18.37,0.29c-0.39,-0.39 -1.02,-0.39 -1.41,0L15,2.25 18.75,6l1.96,-1.96z"/>
+    <path android:fillColor="#fe866a" android:pathData="M0,20h24v4H0z"/>
+</vector>

+ 6 - 0
reader/src/main/res/drawable/ic_reader_right_toolbar_ink_color7.xml

@@ -0,0 +1,6 @@
+<vector android:alpha="0.6" android:height="24dp"
+    android:viewportHeight="24.0" android:viewportWidth="24.0"
+    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#FF000000" android:pathData="M17.75,7L14,3.25l-10,10L4,17h3.75l10,-10zM20.71,4.04c0.39,-0.39 0.39,-1.02 0,-1.41L18.37,0.29c-0.39,-0.39 -1.02,-0.39 -1.41,0L15,2.25 18.75,6l1.96,-1.96z"/>
+    <path android:fillColor="#d11bff" android:pathData="M0,20h24v4H0z"/>
+</vector>

+ 6 - 0
reader/src/main/res/drawable/ic_reader_right_toolbar_ink_color8.xml

@@ -0,0 +1,6 @@
+<vector android:alpha="0.6" android:height="24dp"
+    android:viewportHeight="24.0" android:viewportWidth="24.0"
+    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#FF000000" android:pathData="M17.75,7L14,3.25l-10,10L4,17h3.75l10,-10zM20.71,4.04c0.39,-0.39 0.39,-1.02 0,-1.41L18.37,0.29c-0.39,-0.39 -1.02,-0.39 -1.41,0L15,2.25 18.75,6l1.96,-1.96z"/>
+    <path android:fillColor="#ff1b89" android:pathData="M0,20h24v4H0z"/>
+</vector>

+ 6 - 0
reader/src/main/res/drawable/ic_reader_right_toolbar_ink_color9.xml

@@ -0,0 +1,6 @@
+<vector android:alpha="0.6" android:height="24dp"
+    android:viewportHeight="24.0" android:viewportWidth="24.0"
+    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#FF000000" android:pathData="M17.75,7L14,3.25l-10,10L4,17h3.75l10,-10zM20.71,4.04c0.39,-0.39 0.39,-1.02 0,-1.41L18.37,0.29c-0.39,-0.39 -1.02,-0.39 -1.41,0L15,2.25 18.75,6l1.96,-1.96z"/>
+    <path android:fillColor="#dd0202" android:pathData="M0,20h24v4H0z"/>
+</vector>

File diff suppressed because it is too large
+ 5 - 0
reader/src/main/res/drawable/ic_reader_right_toolbar_settings.xml


+ 5 - 0
reader/src/main/res/drawable/ic_reader_right_toolbar_text.xml

@@ -0,0 +1,5 @@
+<vector android:alpha="0.6" android:height="24dp"
+    android:viewportHeight="24.0" android:viewportWidth="24.0"
+    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#FF000000" android:pathData="M5,4v3h5.5v12h3V7H19V4z"/>
+</vector>

+ 5 - 15
reader/src/main/res/layout/activity_reader.xml

@@ -142,7 +142,7 @@
                     style="@style/ReaderRightToolbarDivider"/>
                 <ImageView
                     android:id="@+id/iv_readerActivity_highLight"
-                    android:src="@drawable/ic_tool_text"
+                    android:src="@drawable/ic_reader_right_toolbar_text"
                     app:layout_constraintTop_toBottomOf="@id/view_readerActivity_rightToolbarDividerCopyHighLight"
                     app:layout_constraintBottom_toTopOf="@id/view_readerActivity_rightToolbarDividerHighLightStrike"
                     style="@style/ReaderLeftRightToolbarIImageButton" />
@@ -165,7 +165,7 @@
                     style="@style/ReaderRightToolbarDivider"/>
                 <ImageView
                     android:id="@+id/iv_readerActivity_strike"
-                    android:src="@drawable/ic_tool_text"
+                    android:src="@drawable/ic_reader_right_toolbar_text"
                     app:layout_constraintTop_toBottomOf="@id/view_readerActivity_rightToolbarDividerHighLightStrike"
                     app:layout_constraintBottom_toTopOf="@id/view_readerActivity_rightToolbarDividerStrikeUnderline"
                     style="@style/ReaderLeftRightToolbarIImageButton" />
@@ -188,7 +188,7 @@
                     style="@style/ReaderRightToolbarDivider"/>
                 <ImageView
                     android:id="@+id/iv_readerActivity_underline"
-                    android:src="@drawable/ic_tool_text"
+                    android:src="@drawable/ic_reader_right_toolbar_text"
                     app:layout_constraintTop_toBottomOf="@id/view_readerActivity_rightToolbarDividerStrikeUnderline"
                     app:layout_constraintBottom_toTopOf="@id/view_readerActivity_rightToolbarDividerUnderlineInk"
                     style="@style/ReaderLeftRightToolbarIImageButton" />
@@ -210,20 +210,10 @@
                     style="@style/ReaderRightToolbarDivider"/>
                 <ImageView
                     android:id="@+id/iv_readerActivity_ink"
-                    android:src="@drawable/ic_tool_ink"
+                    android:src="@drawable/ic_reader_right_toolbar_ink_color1"
                     app:layout_constraintTop_toBottomOf="@id/view_readerActivity_rightToolbarDividerUnderlineInk"
                     app:layout_constraintBottom_toTopOf="@id/view_readerActivity_rightToolbarDividerInkSetting"
                     style="@style/ReaderLeftRightToolbarIImageButton" />
-                <ImageView
-                    android:id="@+id/iv_readerActivity_inkStroke"
-                    style="@style/ReaderLeftRightToolbarIImageButton"
-                    app:layout_constraintLeft_toLeftOf="@id/iv_readerActivity_ink"
-                    app:layout_constraintRight_toRightOf="@id/iv_readerActivity_ink"
-                    app:layout_constraintTop_toTopOf="@id/iv_readerActivity_ink"
-                    app:layout_constraintBottom_toBottomOf="@id/iv_readerActivity_ink"
-                    android:src="@drawable/ic_tool_freehand_s9"
-                    android:layout_width="48dp"
-                    android:layout_height="48dp" />
                 <View
                     android:id="@+id/view_readerActivity_rightToolbarDividerInkSetting"
                     app:layout_constraintLeft_toLeftOf="parent"
@@ -233,7 +223,7 @@
                     style="@style/ReaderRightToolbarDivider"/>
                 <ImageView
                     android:id="@+id/iv_readerActivity_setting"
-                    android:src="@drawable/selector_tool_settings"
+                    android:src="@drawable/ic_reader_right_toolbar_settings"
                     app:layout_constraintTop_toBottomOf="@id/view_readerActivity_rightToolbarDividerInkSetting"
                     app:layout_constraintBottom_toBottomOf="parent"
                     style="@style/ReaderLeftRightToolbarIImageButton" />