Prechádzať zdrojové kódy

Change left toolbar icons

Wayne 5 rokov pred
rodič
commit
3f99a8d237
26 zmenil súbory, kde vykonal 120 pridanie a 16 odobranie
  1. 12 12
      reader/src/main/java/com/kdanmobile/reader/ReaderActivity.kt
  2. BIN
      reader/src/main/res/drawable-hdpi/ic_pagelist_bookmk_h.png
  3. BIN
      reader/src/main/res/drawable-hdpi/ic_pagelist_bookmk_nor.png
  4. BIN
      reader/src/main/res/drawable-hdpi/ic_pagelist_outline_h.png
  5. BIN
      reader/src/main/res/drawable-hdpi/ic_pagelist_outline_nor.png
  6. BIN
      reader/src/main/res/drawable-hdpi/ic_pagelist_search_h.png
  7. BIN
      reader/src/main/res/drawable-hdpi/ic_pagelist_search_nor.png
  8. BIN
      reader/src/main/res/drawable-hdpi/ic_pagelist_thumbnail_h.png
  9. BIN
      reader/src/main/res/drawable-hdpi/ic_pagelist_thumbnail_nor.png
  10. BIN
      reader/src/main/res/drawable-xhdpi/ic_pagelist_bookmk_h.png
  11. BIN
      reader/src/main/res/drawable-xhdpi/ic_pagelist_bookmk_nor.png
  12. BIN
      reader/src/main/res/drawable-xhdpi/ic_pagelist_outline_h.png
  13. BIN
      reader/src/main/res/drawable-xhdpi/ic_pagelist_outline_nor.png
  14. BIN
      reader/src/main/res/drawable-xhdpi/ic_pagelist_search_h.png
  15. BIN
      reader/src/main/res/drawable-xhdpi/ic_pagelist_search_nor.png
  16. BIN
      reader/src/main/res/drawable-xhdpi/ic_pagelist_thumbnail_h.png
  17. BIN
      reader/src/main/res/drawable-xhdpi/ic_pagelist_thumbnail_nor.png
  18. 13 0
      reader/src/main/res/drawable/ic_left_toolbar_bookmarks.xml
  19. 13 0
      reader/src/main/res/drawable/ic_left_toolbar_bookmarks_selected.xml
  20. 13 0
      reader/src/main/res/drawable/ic_left_toolbar_outline.xml
  21. 13 0
      reader/src/main/res/drawable/ic_left_toolbar_outline_selected.xml
  22. 13 0
      reader/src/main/res/drawable/ic_left_toolbar_search.xml
  23. 13 0
      reader/src/main/res/drawable/ic_left_toolbar_search_selected.xml
  24. 13 0
      reader/src/main/res/drawable/ic_left_toolbar_thumbnails.xml
  25. 13 0
      reader/src/main/res/drawable/ic_left_toolbar_thumbnails_selected.xml
  26. 4 4
      reader/src/main/res/layout/activity_reader.xml

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

@@ -619,10 +619,10 @@ abstract class ReaderActivity : AppCompatActivity() {
     }
 
     private fun changeLeftToolbarType(type: LeftToolbarType) {
-        iv_readerActivity_thumbnail.setImageResource(R.drawable.ic_pagelist_thumbnail_nor)
-        iv_readerActivity_bookmark.setImageResource(R.drawable.ic_pagelist_bookmk_nor)
-        iv_readerActivity_outline.setImageResource(R.drawable.ic_pagelist_outline_nor)
-        iv_readerActivity_search.setImageResource(R.drawable.ic_pagelist_search_nor)
+        iv_readerActivity_thumbnail.setImageResource(R.drawable.ic_left_toolbar_thumbnails)
+        iv_readerActivity_bookmark.setImageResource(R.drawable.ic_left_toolbar_bookmarks)
+        iv_readerActivity_outline.setImageResource(R.drawable.ic_left_toolbar_outline)
+        iv_readerActivity_search.setImageResource(R.drawable.ic_left_toolbar_search)
 
         val width = when (type) {
             LeftToolbarType.THUMBNAIL -> w_240
@@ -656,9 +656,9 @@ abstract class ReaderActivity : AppCompatActivity() {
                 thumbnailView.setHandlers(viewModel.pdfInfoHandler, viewModel.thumbnailHandler)
                 linearLayout_readerActivity_leftToolbarContainer.addView(thumbnailView)
             }
-            iv_readerActivity_thumbnail.setImageResource(R.drawable.ic_pagelist_thumbnail_h)
+            iv_readerActivity_thumbnail.setImageResource(R.drawable.ic_left_toolbar_thumbnails_selected)
         } else {
-            iv_readerActivity_thumbnail.setImageResource(R.drawable.ic_pagelist_thumbnail_nor)
+            iv_readerActivity_thumbnail.setImageResource(R.drawable.ic_left_toolbar_thumbnails)
         }
         leftToolbarType = type
     }
@@ -673,9 +673,9 @@ abstract class ReaderActivity : AppCompatActivity() {
                 bookmarkView.setHandlers(viewModel.pdfInfoHandler, viewModel.thumbnailHandler, viewModel.bookmarkHandler)
                 linearLayout_readerActivity_leftToolbarContainer.addView(bookmarkView)
             }
-            iv_readerActivity_bookmark.setImageResource(R.drawable.ic_pagelist_bookmk_h)
+            iv_readerActivity_bookmark.setImageResource(R.drawable.ic_left_toolbar_bookmarks_selected)
         } else {
-            iv_readerActivity_bookmark.setImageResource(R.drawable.ic_pagelist_bookmk_nor)
+            iv_readerActivity_bookmark.setImageResource(R.drawable.ic_left_toolbar_bookmarks)
         }
         leftToolbarType = type
     }
@@ -690,9 +690,9 @@ abstract class ReaderActivity : AppCompatActivity() {
                 outlineView.setHandlers(viewModel.pdfInfoHandler, viewModel.outlineHandler)
                 linearLayout_readerActivity_leftToolbarContainer.addView(outlineView)
             }
-            iv_readerActivity_outline.setImageResource(R.drawable.ic_pagelist_outline_h)
+            iv_readerActivity_outline.setImageResource(R.drawable.ic_left_toolbar_outline_selected)
         } else {
-            iv_readerActivity_outline.setImageResource(R.drawable.ic_pagelist_outline_nor)
+            iv_readerActivity_outline.setImageResource(R.drawable.ic_left_toolbar_outline)
         }
         leftToolbarType = type
     }
@@ -707,9 +707,9 @@ abstract class ReaderActivity : AppCompatActivity() {
                 searchView.setHandlers(viewModel.pdfInfoHandler, viewModel.searchHandler)
                 linearLayout_readerActivity_leftToolbarContainer.addView(searchView)
             }
-            iv_readerActivity_search.setImageResource(R.drawable.ic_pagelist_search_h)
+            iv_readerActivity_search.setImageResource(R.drawable.ic_left_toolbar_search_selected)
         } else {
-            iv_readerActivity_search.setImageResource(R.drawable.ic_pagelist_search_nor)
+            iv_readerActivity_search.setImageResource(R.drawable.ic_left_toolbar_search)
             hideSearchViewSoftKeyboard()
         }
         leftToolbarType = type

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


+ 13 - 0
reader/src/main/res/drawable/ic_left_toolbar_bookmarks.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="M19,18L21,19L21,3C21,1.9 20.1,1 19,1L8.99,1C7.89,1 7,1.9 7,3L17,3C18.1,3 19,3.9 19,5L19,18ZM15,5L5,5C3.9,5 3,5.9 3,7L3,23L10,20L17,23L17,7C17,5.9 16.1,5 15,5Z"
+      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_left_toolbar_bookmarks_selected.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="M19,18L21,19L21,3C21,1.9 20.1,1 19,1L8.99,1C7.89,1 7,1.9 7,3L17,3C18.1,3 19,3.9 19,5L19,18ZM15,5L5,5C3.9,5 3,5.9 3,7L3,23L10,20L17,23L17,7C17,5.9 16.1,5 15,5Z"
+      android:strokeWidth="1"
+      android:fillColor="#0077fd"
+      android:fillAlpha="0.6"
+      android:fillType="nonZero"
+      android:strokeColor="#00000000"/>
+</vector>

+ 13 - 0
reader/src/main/res/drawable/ic_left_toolbar_outline.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="M3,13L5,13L5,11L3,11L3,13ZM3,17L5,17L5,15L3,15L3,17ZM3,9L5,9L5,7L3,7L3,9ZM7,13L21,13L21,11L7,11L7,13ZM7,17L21,17L21,15L7,15L7,17ZM7,7L7,9L21,9L21,7L7,7Z"
+      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_left_toolbar_outline_selected.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="M3,13L5,13L5,11L3,11L3,13ZM3,17L5,17L5,15L3,15L3,17ZM3,9L5,9L5,7L3,7L3,9ZM7,13L21,13L21,11L7,11L7,13ZM7,17L21,17L21,15L7,15L7,17ZM7,7L7,9L21,9L21,7L7,7Z"
+      android:strokeWidth="1"
+      android:fillColor="#0077fd"
+      android:fillAlpha="0.6"
+      android:fillType="nonZero"
+      android:strokeColor="#00000000"/>
+</vector>

+ 13 - 0
reader/src/main/res/drawable/ic_left_toolbar_search.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="M15.5,14L14.71,14L14.43,13.73C15.41,12.59 16,11.11 16,9.5C16,5.91 13.09,3 9.5,3C5.91,3 3,5.91 3,9.5C3,13.09 5.91,16 9.5,16C11.11,16 12.59,15.41 13.73,14.43L14,14.71L14,15.5L19,20.49L20.49,19L15.5,14ZM9.5,14C7.01,14 5,11.99 5,9.5C5,7.01 7.01,5 9.5,5C11.99,5 14,7.01 14,9.5C14,11.99 11.99,14 9.5,14Z"
+      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_left_toolbar_search_selected.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="M15.5,14L14.71,14L14.43,13.73C15.41,12.59 16,11.11 16,9.5C16,5.91 13.09,3 9.5,3C5.91,3 3,5.91 3,9.5C3,13.09 5.91,16 9.5,16C11.11,16 12.59,15.41 13.73,14.43L14,14.71L14,15.5L19,20.49L20.49,19L15.5,14ZM9.5,14C7.01,14 5,11.99 5,9.5C5,7.01 7.01,5 9.5,5C11.99,5 14,7.01 14,9.5C14,11.99 11.99,14 9.5,14Z"
+      android:strokeWidth="1"
+      android:fillColor="#0077fd"
+      android:fillAlpha="0.6"
+      android:fillType="nonZero"
+      android:strokeColor="#00000000"/>
+</vector>

+ 13 - 0
reader/src/main/res/drawable/ic_left_toolbar_thumbnails.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="M3,5L1,5L1,21C1,22.1 1.9,23 3,23L19,23L19,21L3,21L3,5ZM21,1L7,1C5.9,1 5,1.9 5,3L5,17C5,18.1 5.9,19 7,19L21,19C22.1,19 23,18.1 23,17L23,3C23,1.9 22.1,1 21,1ZM21,17L7,17L7,3L21,3L21,17Z"
+      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_left_toolbar_thumbnails_selected.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="M3,5L1,5L1,21C1,22.1 1.9,23 3,23L19,23L19,21L3,21L3,5ZM21,1L7,1C5.9,1 5,1.9 5,3L5,17C5,18.1 5.9,19 7,19L21,19C22.1,19 23,18.1 23,17L23,3C23,1.9 22.1,1 21,1ZM21,17L7,17L7,3L21,3L21,17Z"
+      android:strokeWidth="1"
+      android:fillColor="#0077fd"
+      android:fillAlpha="0.6"
+      android:fillType="nonZero"
+      android:strokeColor="#00000000"/>
+</vector>

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

@@ -76,25 +76,25 @@
                     android:id="@+id/iv_readerActivity_thumbnail"
                     android:onClick="onClick"
                     style="@style/ReaderLeftRightToolbarIImageButton"
-                    android:src="@drawable/ic_pagelist_thumbnail_nor" />
+                    android:src="@drawable/ic_left_toolbar_thumbnails" />
                 <View style="@style/ReaderLeftToolbarDivider"/>
                 <ImageView
                     android:id="@+id/iv_readerActivity_bookmark"
                     android:onClick="onClick"
                     style="@style/ReaderLeftRightToolbarIImageButton"
-                    android:src="@drawable/ic_pagelist_bookmk_nor" />
+                    android:src="@drawable/ic_left_toolbar_bookmarks" />
                 <View style="@style/ReaderLeftToolbarDivider"/>
                 <ImageView
                     android:id="@+id/iv_readerActivity_outline"
                     android:onClick="onClick"
                     style="@style/ReaderLeftRightToolbarIImageButton"
-                    android:src="@drawable/ic_pagelist_outline_nor" />
+                    android:src="@drawable/ic_left_toolbar_outline" />
                 <View style="@style/ReaderLeftToolbarDivider"/>
                 <ImageView
                     android:id="@+id/iv_readerActivity_search"
                     android:onClick="onClick"
                     style="@style/ReaderLeftRightToolbarIImageButton"
-                    android:src="@drawable/ic_pagelist_search_nor" />
+                    android:src="@drawable/ic_left_toolbar_search" />
             </LinearLayout>
         </android.support.constraint.ConstraintLayout>
     </com.kdanmobile.reader.view.HorizontalView>