增强点击翻页设置

pull/473/head
gedoor 4 years ago
parent bf32ea14ff
commit d0c976ea56
  1. 8
      app/src/main/java/io/legado/app/ui/book/read/config/ClickActionConfigDialog.kt
  2. 6
      app/src/main/res/drawable/shape_translucent_card.xml
  3. 75
      app/src/main/res/layout/dialog_click_action_config.xml

@ -6,6 +6,9 @@ import android.view.View
import android.view.ViewGroup
import io.legado.app.R
import io.legado.app.base.BaseDialogFragment
import io.legado.app.utils.getCompatColor
import kotlinx.android.synthetic.main.dialog_click_action_config.*
import org.jetbrains.anko.sdk27.listeners.onClick
class ClickActionConfigDialog : BaseDialogFragment() {
@ -26,7 +29,10 @@ class ClickActionConfigDialog : BaseDialogFragment() {
}
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) {
view.setBackgroundColor(getCompatColor(R.color.translucent))
iv_close.onClick {
dismiss()
}
}

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="3dp" />
<solid android:color="@color/translucent" />
</shape>

@ -1,35 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/root_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/translucent"
android:padding="3dp"
android:orientation="vertical"
tools:ignore="NestedWeights">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="@drawable/shape_translucent_card"
android:gravity="center_vertical"
android:paddingTop="6dp"
android:paddingBottom="6dp"
android:orientation="horizontal"
android:layout_margin="3dp"
android:paddingLeft="16dp"
android:paddingTop="6dp"
android:paddingRight="16dp"
android:paddingBottom="6dp"
tools:ignore="UseCompoundDrawables">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/click_regional_config" />
android:text="@string/click_regional_config"
android:textColor="@color/white" />
<ImageView
android:id="@+id/iv_close"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/colse"
android:src="@drawable/ic_baseline_close"
android:contentDescription="@string/colse" />
app:tint="@color/white" />
</LinearLayout>
@ -39,31 +46,37 @@
android:layout_weight="1"
android:orientation="horizontal">
<io.legado.app.ui.widget.text.StrokeTextView
<TextView
android:id="@+id/view_top_left"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_margin="3dp"
android:layout_weight="1"
android:background="@drawable/shape_translucent_card"
android:gravity="center"
android:textColor="@color/white"
tools:text="上一页" />
<io.legado.app.ui.widget.text.StrokeTextView
<TextView
android:id="@+id/view_top_center"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_margin="3dp"
android:layout_weight="1"
android:background="@drawable/shape_translucent_card"
android:gravity="center"
android:textColor="@color/white"
tools:text="上一页" />
<io.legado.app.ui.widget.text.StrokeTextView
<TextView
android:id="@+id/view_top_right"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_margin="3dp"
android:layout_weight="1"
android:background="@drawable/shape_translucent_card"
android:gravity="center"
android:textColor="@color/white"
tools:text="下一页" />
</LinearLayout>
@ -74,31 +87,37 @@
android:layout_weight="1"
android:orientation="horizontal">
<io.legado.app.ui.widget.text.StrokeTextView
<TextView
android:id="@+id/view_center_left"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_margin="3dp"
android:layout_weight="1"
android:background="@drawable/shape_translucent_card"
android:gravity="center"
android:textColor="@color/white"
tools:text="上一页" />
<io.legado.app.ui.widget.text.StrokeTextView
<TextView
android:id="@+id/view_center"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_margin="3dp"
android:layout_weight="1"
android:background="@drawable/shape_translucent_card"
android:gravity="center"
android:text="@string/menu" />
android:text="@string/menu"
android:textColor="@color/white" />
<io.legado.app.ui.widget.text.StrokeTextView
<TextView
android:id="@+id/view_center_right"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_margin="3dp"
android:layout_weight="1"
android:background="@drawable/shape_translucent_card"
android:gravity="center"
android:textColor="@color/white"
tools:text="下一页" />
</LinearLayout>
@ -109,32 +128,38 @@
android:layout_weight="1"
android:orientation="horizontal">
<io.legado.app.ui.widget.text.StrokeTextView
<TextView
android:id="@+id/view_bottom_left"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
tools:ignore="NestedWeights"
android:layout_margin="3dp"
android:layout_weight="1"
android:background="@drawable/shape_translucent_card"
android:gravity="center"
android:textColor="@color/white"
tools:ignore="NestedWeights"
tools:text="上一页" />
<io.legado.app.ui.widget.text.StrokeTextView
<TextView
android:id="@+id/view_bottom_center"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_margin="3dp"
android:layout_weight="1"
android:background="@drawable/shape_translucent_card"
android:gravity="center"
android:textColor="@color/white"
tools:text="下一页" />
<io.legado.app.ui.widget.text.StrokeTextView
<TextView
android:id="@+id/view_bottom_right"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_margin="3dp"
android:layout_weight="1"
android:background="@drawable/shape_translucent_card"
android:gravity="center"
android:textColor="@color/white"
tools:text="下一页" />
</LinearLayout>

Loading…
Cancel
Save