Improve tablet navigation
This commit is contained in:
12
app/src/main/res/drawable/ic_drawer_menu.xml
Normal file
12
app/src/main/res/drawable/ic_drawer_menu.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M3,18h18v-2L3,16v2zM3,13h18v-2L3,11v2zM3,6v2h18L21,6L3,6z" />
|
||||
</vector>
|
||||
13
app/src/main/res/drawable/ic_drawer_menu_open.xml
Normal file
13
app/src/main/res/drawable/ic_drawer_menu_open.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:autoMirrored="true"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M120,720v-80L640,640v80L120,720ZM784,680L584,480L784,280l56,56L696,480L840,624l-56,56ZM120,520v-80L520,440v80L120,520ZM120,320v-80L640,240v80L120,320Z" />
|
||||
</vector>
|
||||
@@ -12,6 +12,7 @@
|
||||
android:id="@+id/navRail"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:fitsSystemWindows="false"
|
||||
app:elevation="1dp"
|
||||
app:headerLayout="@layout/navigation_rail_fab"
|
||||
@@ -60,6 +61,16 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_scrollFlags="scroll|enterAlways|snap">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical|start"
|
||||
android:paddingStart="@dimen/screen_padding"
|
||||
android:textAppearance="?textAppearanceTitleLarge"
|
||||
tools:ignore="RtlSymmetry"
|
||||
tools:text="@string/history" />
|
||||
|
||||
<com.google.android.material.search.SearchBar
|
||||
android:id="@+id/search_bar"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -34,23 +34,21 @@
|
||||
android:gravity="center_vertical"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?attr/textAppearanceTitleSmall"
|
||||
app:layout_constraintEnd_toStartOf="@id/imageView_expand"
|
||||
app:layout_constraintEnd_toStartOf="@id/button_expand"
|
||||
app:layout_constraintStart_toEndOf="@id/imageView_cover"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_goneMarginEnd="12dp"
|
||||
tools:text="@tools:sample/lorem" />
|
||||
|
||||
<org.koitharu.kotatsu.core.ui.widgets.CheckableImageView
|
||||
android:id="@+id/imageView_expand"
|
||||
<org.koitharu.kotatsu.core.ui.widgets.CheckableImageButton
|
||||
android:id="@+id/button_expand"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/details"
|
||||
android:contentDescription="@string/expand"
|
||||
android:minWidth="?minTouchTargetSize"
|
||||
android:minHeight="?minTouchTargetSize"
|
||||
android:pointerIcon="hand"
|
||||
android:scaleType="center"
|
||||
android:tooltipText="@string/details"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
@@ -63,7 +61,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:barrierDirection="bottom"
|
||||
app:constraint_referenced_ids="imageView_cover,textView_status,imageView_expand,textView_details" />
|
||||
app:constraint_referenced_ids="imageView_cover,textView_status,button_expand,textView_details" />
|
||||
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/progressBar"
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
android:id="@+id/chips_genres"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipChildren="false"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingBottom="12dp"
|
||||
app:singleLine="true" />
|
||||
|
||||
@@ -1,9 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/railFab"
|
||||
android:layout_width="wrap_content"
|
||||
android:id="@+id/cat_navigation_rail_efab_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/_continue"
|
||||
app:srcCompat="@drawable/ic_read" />
|
||||
android:layout_gravity="top|start"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_expand"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/expand"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_drawer_menu" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||
android:id="@+id/railFab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/_continue"
|
||||
app:icon="@drawable/ic_read" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -840,4 +840,6 @@
|
||||
<string name="hide_from_main_screen">Hide from main screen</string>
|
||||
<string name="changelog">Changelog</string>
|
||||
<string name="changelog_summary">Changes history for recently released versions</string>
|
||||
<string name="collapse">Collapse</string>
|
||||
<string name="expand">Expand</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user