瀏覽代碼

Merge branch 'remove-fullscreen-copy'

Wayne 5 年之前
父節點
當前提交
6eecd4847f

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

@@ -169,15 +169,8 @@ abstract class ReaderActivity : AppCompatActivity() {
     private fun onIsCopyModeUpdate(isCopyMode: Boolean?) {
         if (isCopyMode == null) return
         when (isCopyMode) {
-            true -> {
-                val color = resources.getColor(R.color.reader_right_toolbar_selected_bg)
-                iv_readerActivity_copy.setBackgroundColor(color)
-                hideTopLeftBottomToolbars()
-            }
-            false -> {
-                iv_readerActivity_copy.setBackgroundDrawable(null)
-                showAllToolbars()
-            }
+            true -> hideTopLeftBottomToolbars()
+            false -> showAllToolbars()
         }
     }
 
@@ -506,7 +499,6 @@ abstract class ReaderActivity : AppCompatActivity() {
     }
 
     private fun setupRightToolbar() {
-        iv_readerActivity_copy.setOnClickListener { viewModel.onClickCopyBtn() }
         iv_readerActivity_highLight.apply {
             setOnClickListener { viewModel.onClickHighlightBtn() }
             setOnLongClickListener { btn ->
@@ -740,9 +732,6 @@ abstract class ReaderActivity : AppCompatActivity() {
             R.id.iv_readerActivity_search -> {
                 onSearchClick()
             }
-            R.id.iv_readerActivity_fullScreen -> {
-                hideTopLeftBottomToolbars()
-            }
             else -> {
 
             }

二進制
reader/src/main/res/drawable-hdpi/ic_tool_fullscreen.png


二進制
reader/src/main/res/drawable-hdpi/ic_tool_fullscreen_h.png


二進制
reader/src/main/res/drawable-xhdpi/ic_tool_fullscreen.png


二進制
reader/src/main/res/drawable-xhdpi/ic_tool_fullscreen_h.png


+ 0 - 8
reader/src/main/res/drawable-xhdpi/selector_tool_fullscreen.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_fullscreen_h" android:state_pressed="true"/>
-    <item android:drawable="@drawable/ic_tool_fullscreen_h" android:state_enabled="true" android:state_focused="true"/>
-    <item android:drawable="@drawable/ic_tool_fullscreen"/>
-
-</selector>

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

@@ -1,5 +0,0 @@
-<vector android:height="24dp" android:tint="#666666"
-    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="M16,1L4,1c-1.1,0 -2,0.9 -2,2v14h2L4,3h12L16,1zM19,5L8,5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h11c1.1,0 2,-0.9 2,-2L21,7c0,-1.1 -0.9,-2 -2,-2zM19,21L8,21L8,7h11v14z"/>
-</vector>

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

@@ -111,19 +111,6 @@
                 android:orientation="vertical"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content">
-                <ImageView
-                    android:id="@+id/iv_readerActivity_fullScreen"
-                    android:src="@drawable/selector_tool_fullscreen"
-                    android:onClick="onClick"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintBottom_toTopOf="@id/iv_readerActivity_copy"
-                    style="@style/ReaderLeftRightToolbarIImageButton" />
-                <ImageView
-                    android:id="@+id/iv_readerActivity_copy"
-                    android:src="@drawable/ic_content_copy_gray_24dp"
-                    app:layout_constraintTop_toBottomOf="@id/iv_readerActivity_fullScreen"
-                    app:layout_constraintBottom_toTopOf="@id/iv_readerActivity_highLight"
-                    style="@style/ReaderLeftRightToolbarIImageButton" />
                 <View
                     android:id="@+id/view_readerActivity_highLightStroke"
                     app:layout_constraintTop_toTopOf="@id/iv_readerActivity_highLight"
@@ -137,7 +124,7 @@
                 <ImageView
                     android:id="@+id/iv_readerActivity_highLight"
                     android:src="@drawable/ic_reader_right_toolbar_text"
-                    app:layout_constraintTop_toBottomOf="@id/iv_readerActivity_copy"
+                    app:layout_constraintTop_toBottomOf="parent"
                     app:layout_constraintBottom_toTopOf="@id/iv_readerActivity_strike"
                     style="@style/ReaderLeftRightToolbarIImageButton" />
                 <ImageView