Browse Source

Merge branch 'change-bota-selected-color'

Wayne 5 years ago
parent
commit
40e1f7920e

+ 6 - 6
reader/src/main/java/com/kdanmobile/reader/screen/view/SearchView.kt

@@ -15,18 +15,18 @@ import android.widget.*
 import com.kdanmobile.kmpdfkit.pdfcommon.TextWord
 import com.kdanmobile.reader.R
 import com.kdanmobile.reader.screen.adapter.SearchAdapter
-import com.kdanmobile.reader.screen.model.SearchResultInfo
 import com.kdanmobile.reader.screen.handler.PdfInfoHandler
 import com.kdanmobile.reader.screen.handler.SearchHandler
+import com.kdanmobile.reader.screen.model.SearchResultInfo
 import com.kdanmobile.reader.screen.model.SimpleTextWatcher
 import com.kdanmobile.reader.utils.DensityUtil
 import io.reactivex.Completable
 import io.reactivex.android.schedulers.AndroidSchedulers
 import io.reactivex.disposables.Disposable
 import io.reactivex.schedulers.Schedulers
-import java.util.ArrayList
 import kotlinx.android.synthetic.main.view_search.view.*
 import java.lang.ref.WeakReference
+import java.util.*
 
 class SearchView: RelativeLayout, View.OnClickListener {
     private var pdfInfoHandler: PdfInfoHandler? = null
@@ -235,8 +235,8 @@ class SearchView: RelativeLayout, View.OnClickListener {
             R.id.tv_fragmentPdfReaderSearch_page -> {
                 if (!isPage) {
                     et_search.isLongClickable = false
-                    tv_page.setTextColor(-0xcc4a1b)
-                    tv_text.setTextColor(-0x505051)
+                    tv_page.setTextColor(resources.getColor(R.color.reader_search_title_selected))
+                    tv_text.setTextColor(resources.getColor(R.color.reader_search_title_normal))
                     et_search.setText("")
                     et_search.setHint(R.string.fragment_search_enter_page)
                     et_search.inputType = InputType.TYPE_CLASS_NUMBER
@@ -253,8 +253,8 @@ class SearchView: RelativeLayout, View.OnClickListener {
             R.id.tv_fragmentPdfReaderSearch_text -> {
                 if (isPage) {
                     et_search.isLongClickable = true
-                    tv_page.setTextColor(-0x505051)
-                    tv_text.setTextColor(-0xcc4a1b)
+                    tv_page.setTextColor(resources.getColor(R.color.reader_search_title_normal))
+                    tv_text.setTextColor(resources.getColor(R.color.reader_search_title_selected))
                     et_search.setText("")
                     et_search.setHint(R.string.fragment_search_enter_text)
                     et_search.inputType = InputType.TYPE_CLASS_TEXT

+ 0 - 1
reader/src/main/res/drawable/ic_left_toolbar_bookmarks_selected.xml

@@ -7,7 +7,6 @@
       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>

+ 0 - 1
reader/src/main/res/drawable/ic_left_toolbar_outline_selected.xml

@@ -7,7 +7,6 @@
       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>

+ 0 - 1
reader/src/main/res/drawable/ic_left_toolbar_search_selected.xml

@@ -7,7 +7,6 @@
       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>

+ 0 - 1
reader/src/main/res/drawable/ic_left_toolbar_thumbnails_selected.xml

@@ -7,7 +7,6 @@
       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>

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

@@ -2,6 +2,6 @@
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
     android:shape="rectangle" >
 
-    <solid android:color="#6633b5e5" />
+    <solid android:color="@color/reader_outline_background_selected" />
 
 </shape>

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

@@ -4,7 +4,7 @@
 
     <stroke
         android:width="4dp"
-        android:color="#33b5e5" />
+        android:color="@color/bright_blue" />
 
     <solid android:color="#0000"/>
     

+ 1 - 1
reader/src/main/res/layout/view_search.xml

@@ -22,7 +22,7 @@
                 android:layout_weight="1"
                 android:gravity="center"
                 android:text="@string/fragment_search_text"
-                android:textColor="#33b5e5"
+                android:textColor="@color/reader_search_title_selected"
                 android:textSize="15sp" />
 
             <TextView

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

@@ -4,6 +4,7 @@
     <color name="black_54">#8A000000</color>
     <color name="black_38">#61000000</color>
     <color name="picton_blue">#30AFFD</color>
+    <color name="bright_blue">#0077fd</color>
 
     <color name="reader_top_toolbar_bg">#FFFFFF</color>
     <color name="reader_bottom_toolbar_bg">#FFFFFF</color>
@@ -34,4 +35,11 @@
     <color name="reader_viewer_edit_tab_color_selected">#0077FD</color>
 
     <color name="reader_bota_title_color">#99000000</color>
+    <color name="reader_thumbnail_page_normal">#99000000</color>
+    <color name="reader_thumbnail_page_selected">@android:color/white</color>
+    <color name="reader_thumbnail_background_normal">#99cccccc</color>
+    <color name="reader_thumbnail_background_selected">@color/bright_blue</color>
+    <color name="reader_outline_background_selected">@color/bright_blue</color>
+    <color name="reader_search_title_normal">#afafaf</color>
+    <color name="reader_search_title_selected">@color/bright_blue</color>
 </resources>