mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 03:07:25 +01:00
Adjust reader seekbar design
- Revert back to old prev/next chapter icons - Make views taller for easier actions - Use more consistent spacing - Add ripples to prev/next chapter buttons
This commit is contained in:
parent
03ad48c055
commit
829a65e515
9
app/src/main/res/drawable/ic_skip_next_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_skip_next_24dp.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M6,18l8.5,-6L6,6v12zM16,6v12h2V6h-2z" />
|
||||
</vector>
|
9
app/src/main/res/drawable/ic_skip_previous_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_skip_previous_24dp.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M6,6h2v12L6,18zM9.5,12l8.5,6L18,6z" />
|
||||
</vector>
|
@ -1,6 +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="15dp" />
|
||||
<corners android:radius="48dp" />
|
||||
<solid android:color="?attr/colorPrimary" />
|
||||
</shape>
|
||||
|
7
app/src/main/res/drawable/reader_seekbar_button.xml
Normal file
7
app/src/main/res/drawable/reader_seekbar_button.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/reader_seekbar_ripple" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/reader_seekbar_ripple" android:state_focused="true" />
|
||||
<item android:drawable="@drawable/reader_seekbar_ripple" android:state_selected="true" />
|
||||
<item android:drawable="@drawable/reader_seekbar_background" />
|
||||
</selector>
|
10
app/src/main/res/drawable/reader_seekbar_ripple.xml
Normal file
10
app/src/main/res/drawable/reader_seekbar_ripple.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="?attr/colorOnPrimary">
|
||||
<item android:id="@android:id/mask">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@android:color/white" />
|
||||
<corners android:radius="48dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
@ -68,33 +68,31 @@
|
||||
android:id="@+id/reader_nav"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:gravity="center"
|
||||
android:layoutDirection="ltr"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/left_chapter"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="50dp"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@drawable/reader_seekbar_background"
|
||||
android:contentDescription="@string/action_previous_chapter"
|
||||
android:padding="@dimen/material_layout_keylines_screen_edge_margin"
|
||||
app:srcCompat="@drawable/ic_arrow_back_24dp"
|
||||
app:srcCompat="@drawable/ic_skip_previous_24dp"
|
||||
app:tint="?attr/colorOnPrimary" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/reader_seekbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/reader_seekbar_background"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp">
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/reader_seekbar_button"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/left_page_text"
|
||||
@ -128,18 +126,15 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- android:background="?selectableItemBackgroundBorderless"-->
|
||||
<ImageButton
|
||||
android:id="@+id/right_chapter"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="50dp"
|
||||
android:background="@drawable/reader_seekbar_background"
|
||||
android:background="@drawable/reader_seekbar_button"
|
||||
android:contentDescription="@string/action_next_chapter"
|
||||
android:padding="@dimen/material_layout_keylines_screen_edge_margin"
|
||||
app:srcCompat="@drawable/ic_arrow_forward_24dp"
|
||||
app:srcCompat="@drawable/ic_skip_next_24dp"
|
||||
app:tint="?attr/colorOnPrimary" />
|
||||
|
||||
</LinearLayout>
|
||||
|
Loading…
Reference in New Issue
Block a user