Global Search (#849)
* Global Search * Cards are now independent of design by use of recycler. * Added local * Some attribute fixes + moved onclick to controller. * Lots of improvements to code * Reversed some stuff. Thanks API 16 * Code fixes * Performance improvements * Moved adapter creation to constructor * Small changes * Removed sources settings from settings menu. Added OnChangeListener in catalogue. Made setting icon visible if room. * bug fix * Code review part uno * Code review part uno-2 * Single recycler approach * Add last source used * Fix scroll state and some layout issues * Fix wrong item binding * Use data class for items * Calculate item position and count while binding * Fix background color with slices * Reuse slices. Fix card background. Flatten constraint layout * Fix global_search scroll issue * Store last state with global search * Minor changes * Remove catalogue toolbar spinner. Persist catalogue across process restarts * Save view state of recycler views. Set toolbar title with current query
This commit is contained in:
committed by
inorichi
parent
56bde40035
commit
54c8b3ef29
@@ -18,6 +18,4 @@
|
||||
</item>
|
||||
</selector>
|
||||
</item>
|
||||
|
||||
|
||||
</ripple>
|
||||
</ripple>
|
||||
@@ -18,6 +18,4 @@
|
||||
</item>
|
||||
</selector>
|
||||
</item>
|
||||
|
||||
|
||||
</ripple>
|
||||
</ripple>
|
||||
@@ -18,6 +18,4 @@
|
||||
</item>
|
||||
</selector>
|
||||
</item>
|
||||
|
||||
|
||||
</ripple>
|
||||
</ripple>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/rippleColorDark">
|
||||
android:color="@color/rippleColorDark">
|
||||
<item>
|
||||
<selector>
|
||||
<item android:state_selected="true">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/rippleColorDark">
|
||||
android:color="@color/rippleColorDark">
|
||||
<item>
|
||||
<selector>
|
||||
<item android:state_selected="true">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/rippleColorLight">
|
||||
android:color="@color/rippleColorLight">
|
||||
<item>
|
||||
<selector>
|
||||
<item android:state_selected="true">
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="?android:colorControlHighlight">
|
||||
<item android:id="@android:id/mask">
|
||||
<color android:color="@android:color/white" />
|
||||
</item>
|
||||
</ripple>
|
||||
9
app/src/main/res/drawable/ic_search_black_112dp.xml
Normal file
9
app/src/main/res/drawable/ic_search_black_112dp.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="112dp"
|
||||
android:height="112dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z" />
|
||||
</vector>
|
||||
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector android:exitFadeDuration="@android:integer/config_longAnimTime"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:state_focused="true" android:drawable="@color/selectorColorDark"/>
|
||||
<item android:state_pressed="true" android:drawable="@color/selectorColorDark"/>
|
||||
<item android:state_activated="true" android:drawable="@color/selectorColorDark"/>
|
||||
<item android:drawable="@color/md_black_1000"/>
|
||||
|
||||
</selector>
|
||||
</selector>
|
||||
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector android:exitFadeDuration="@android:integer/config_longAnimTime"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:state_focused="true" android:drawable="@color/selectorColorDark"/>
|
||||
<item android:state_pressed="true" android:drawable="@color/selectorColorDark"/>
|
||||
<item android:state_activated="true" android:drawable="@color/selectorColorDark"/>
|
||||
<item android:drawable="@color/backgroundDark"/>
|
||||
|
||||
</selector>
|
||||
</selector>
|
||||
@@ -1,19 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<selector android:exitFadeDuration="@android:integer/config_longAnimTime"-->
|
||||
<!--xmlns:android="http://schemas.android.com/apk/res/android">-->
|
||||
|
||||
<!--<item android:state_focused="true" android:drawable="?attr/colorAccent"/>-->
|
||||
<!--<item android:state_pressed="true" android:drawable="?attr/colorAccent"/>-->
|
||||
<!--<item android:state_activated="true" android:drawable="?attr/colorAccent"/>-->
|
||||
<!--<item android:drawable="?android:attr/colorBackground"/>-->
|
||||
<!--</selector>-->
|
||||
|
||||
<selector android:exitFadeDuration="@android:integer/config_longAnimTime"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:state_focused="true" android:drawable="@color/selectorColorLight"/>
|
||||
<item android:state_pressed="true" android:drawable="@color/selectorColorLight"/>
|
||||
<item android:state_activated="true" android:drawable="@color/selectorColorLight"/>
|
||||
<item android:drawable="@color/backgroundLight"/>
|
||||
|
||||
</selector>
|
||||
</selector>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:exitFadeDuration="@android:integer/config_longAnimTime">
|
||||
android:exitFadeDuration="@android:integer/config_longAnimTime">
|
||||
|
||||
<item android:drawable="@color/rippleColorDark" android:state_focused="true"/>
|
||||
<item android:drawable="@color/rippleColorDark" android:state_pressed="true"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:exitFadeDuration="@android:integer/config_longAnimTime">
|
||||
android:exitFadeDuration="@android:integer/config_longAnimTime">
|
||||
|
||||
<item android:drawable="@color/rippleColorDark" android:state_focused="true"/>
|
||||
<item android:drawable="@color/rippleColorDark" android:state_pressed="true"/>
|
||||
|
||||
@@ -1,15 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<selector android:exitFadeDuration="@android:integer/config_longAnimTime"-->
|
||||
<!--xmlns:android="http://schemas.android.com/apk/res/android">-->
|
||||
|
||||
<!--<item android:state_focused="true" android:drawable="?attr/colorAccent"/>-->
|
||||
<!--<item android:state_pressed="true" android:drawable="?attr/colorAccent"/>-->
|
||||
<!--<item android:state_activated="true" android:drawable="?attr/colorAccent"/>-->
|
||||
<!--<item android:drawable="?android:attr/colorBackground"/>-->
|
||||
<!--</selector>-->
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:exitFadeDuration="@android:integer/config_longAnimTime">
|
||||
android:exitFadeDuration="@android:integer/config_longAnimTime">
|
||||
|
||||
<item android:drawable="@color/rippleColorLight" android:state_focused="true"/>
|
||||
<item android:drawable="@color/rippleColorLight" android:state_pressed="true"/>
|
||||
|
||||
10
app/src/main/res/drawable/list_item_selector_trans.xml
Normal file
10
app/src/main/res/drawable/list_item_selector_trans.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:exitFadeDuration="@android:integer/config_longAnimTime">
|
||||
|
||||
<item android:drawable="@color/rippleColorLight" android:state_focused="true"/>
|
||||
<item android:drawable="@color/rippleColorLight" android:state_pressed="true"/>
|
||||
<item android:drawable="@color/rippleColorLight" android:state_activated="true"/>
|
||||
<item android:drawable="@android:color/transparent"/>
|
||||
|
||||
</selector>
|
||||
15
app/src/main/res/drawable/text_button.xml
Normal file
15
app/src/main/res/drawable/text_button.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="?attr/colorAccent" />
|
||||
|
||||
<solid android:color="?attr/cardBackgroundColor" />
|
||||
|
||||
<padding
|
||||
android:left="1dp"
|
||||
android:right="1dp"
|
||||
android:top="1dp" />
|
||||
|
||||
<corners android:radius="5dp" />
|
||||
</shape>
|
||||
@@ -6,12 +6,12 @@
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/catalogue_view"
|
||||
tools:context="eu.kanade.tachiyomi.ui.catalogue.CatalogueController">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/catalogue_view"
|
||||
tools:context="eu.kanade.tachiyomi.ui.catalogue.CatalogueController">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress"
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/recycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="4dp"
|
||||
android:paddingTop="4dp"
|
||||
tools:listitem="@layout/catalogue_global_search_controller_card" />
|
||||
</FrameLayout>
|
||||
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout
|
||||
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:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
style="@style/TextAppearance.Regular.SubHeading"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:padding="@dimen/material_component_text_fields_padding_above_and_below_label"
|
||||
app:layout_constraintBottom_toTopOf="@+id/source_card"
|
||||
app:layout_constraintHeight_default="wrap"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="Title" />
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:id="@+id/source_card"
|
||||
style="@style/Theme.Widget.CardView.Item"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:minHeight="144dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_default="wrap"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress"
|
||||
style="?android:attr/progressBarStyleSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
<android.support.constraint.ConstraintLayout
|
||||
android:id="@+id/nothing_found"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/nothing_found_icon"
|
||||
android:layout_width="112dp"
|
||||
android:layout_height="112dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="ContentDescription"
|
||||
tools:src="@mipmap/ic_launcher" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nothing_found_text"
|
||||
style="@style/TextAppearance.Regular.Caption.Hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="0dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:paddingBottom="8dp"
|
||||
android:text="@string/no_results"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/nothing_found_icon" />
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/recycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingEnd="4dp"
|
||||
android:paddingStart="4dp"
|
||||
tools:listitem="@layout/catalogue_global_search_controller_card_item" />
|
||||
</android.support.v7.widget.CardView>
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout
|
||||
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:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectable_list_drawable"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingEnd="4dp"
|
||||
android:paddingStart="4dp"
|
||||
android:paddingTop="8dp">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress"
|
||||
style="?android:attr/progressBarStyleSmall"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintHeight_default="wrap"
|
||||
app:layout_constraintWidth_default="wrap"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/itemImage"
|
||||
android:layout_width="112dp"
|
||||
android:layout_height="112dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="ContentDescription"
|
||||
tools:src="@mipmap/ic_launcher" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTitle"
|
||||
style="@style/TextAppearance.Regular.Caption"
|
||||
android:layout_width="104dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
app:layout_constraintHeight_default="wrap"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/itemImage"
|
||||
tools:text="Sample title" />
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
@@ -5,7 +5,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectable_library_drawable">
|
||||
android:background="?selectable_library_drawable">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
android:paddingEnd="0dp"
|
||||
android:paddingLeft="@dimen/material_component_lists_icon_left_padding"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingStart="@dimen/material_component_lists_icon_left_padding"
|
||||
tools:src="@drawable/icon"/>
|
||||
android:paddingStart="@dimen/material_component_lists_icon_left_padding"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
|
||||
14
app/src/main/res/layout/catalogue_main_controller.xml
Normal file
14
app/src/main/res/layout/catalogue_main_controller.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/recycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:listitem="@layout/catalogue_main_controller_card" />
|
||||
|
||||
</FrameLayout>
|
||||
18
app/src/main/res/layout/catalogue_main_controller_card.xml
Normal file
18
app/src/main/res/layout/catalogue_main_controller_card.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
style="@style/TextAppearance.Regular.SubHeading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingLeft="@dimen/material_component_text_fields_padding_above_and_below_label"
|
||||
tools:text="Title" />
|
||||
|
||||
</FrameLayout>
|
||||
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout
|
||||
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:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<android.support.constraint.ConstraintLayout
|
||||
android:id="@+id/card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/material_component_lists_two_line_height"
|
||||
android:background="?attr/selectable_list_drawable">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="56dp"
|
||||
android:clickable="true"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
tools:src="@mipmap/ic_launcher_round"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingRight="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:ellipsize="end"
|
||||
android:textAppearance="@style/TextAppearance.Regular.SubHeading"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/image"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@+id/source_latest"
|
||||
tools:text="Source title"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/source_latest"
|
||||
style="@style/TextAppearance.Medium.Button"
|
||||
android:background="@drawable/list_item_selector_trans"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/latest"
|
||||
android:padding="@dimen/material_component_dialogs_padding_around_buttons"
|
||||
app:layout_constraintRight_toLeftOf="@+id/source_browse"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/source_browse"
|
||||
style="@style/TextAppearance.Medium.Button"
|
||||
android:background="@drawable/list_item_selector_trans"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/browse"
|
||||
android:padding="@dimen/material_component_dialogs_padding_around_buttons"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
||||
</FrameLayout>
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/catalogue_grid"
|
||||
style="@style/Theme.Widget.GridView"
|
||||
style="@style/Theme.Widget.GridView.Catalogue"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:columnWidth="140dp"
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
android:paddingLeft="@dimen/material_component_lists_icon_left_padding"
|
||||
android:paddingStart="@dimen/material_component_lists_icon_left_padding"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingEnd="0dp"/>
|
||||
android:paddingEnd="0dp"
|
||||
tools:src="@mipmap/ic_launcher_round"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/library_grid"
|
||||
style="@style/Theme.Widget.GridView"
|
||||
style="@style/Theme.Widget.GridView.Catalogue"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:columnWidth="140dp"
|
||||
|
||||
16
app/src/main/res/menu/catalogue_main.xml
Normal file
16
app/src/main/res/menu/catalogue_main.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<menu 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" tools:context=".CatalogueListActivity">
|
||||
|
||||
<item
|
||||
android:id="@+id/action_search"
|
||||
android:title="@string/action_search"
|
||||
android:icon="@drawable/ic_search_white_24dp"
|
||||
app:showAsAction="collapseActionView|ifRoom"
|
||||
app:actionViewClass="android.support.v7.widget.SearchView"/>
|
||||
|
||||
<item android:id="@+id/action_settings"
|
||||
android:title="@string/pref_category_sources"
|
||||
android:icon="@drawable/ic_settings_white_24dp"
|
||||
app:showAsAction="ifRoom"/>
|
||||
</menu>
|
||||
11
app/src/main/res/menu/catalogue_new_list.xml
Normal file
11
app/src/main/res/menu/catalogue_new_list.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<menu 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" tools:context=".CatalogueListActivity">
|
||||
|
||||
<item
|
||||
android:id="@+id/action_search"
|
||||
android:title="@string/action_search"
|
||||
android:icon="@drawable/ic_search_white_24dp"
|
||||
app:showAsAction="collapseActionView|ifRoom"
|
||||
app:actionViewClass="android.support.v7.widget.SearchView"/>
|
||||
</menu>
|
||||
@@ -34,6 +34,7 @@
|
||||
<string name="action_sort_last_read">Last read</string>
|
||||
<string name="action_sort_last_updated">Last updated</string>
|
||||
<string name="action_search">Search</string>
|
||||
<string name="action_global_search">Global search</string>
|
||||
<string name="action_select_all">Select all</string>
|
||||
<string name="action_mark_as_read">Mark as read</string>
|
||||
<string name="action_mark_as_unread">Mark as unread</string>
|
||||
@@ -85,6 +86,8 @@
|
||||
<string name="action_open_log">Open log</string>
|
||||
<string name="action_create">Create</string>
|
||||
<string name="action_restore">Restore</string>
|
||||
<string name="action_open">Open</string>
|
||||
<string name="action_login">Login</string>
|
||||
|
||||
<!-- Operations -->
|
||||
<string name="deleting">Deleting…</string>
|
||||
@@ -276,8 +279,13 @@
|
||||
<string name="no_valid_sources">Please enable at least one valid source</string>
|
||||
<string name="no_more_results">No more results</string>
|
||||
<string name="local_source">Local manga</string>
|
||||
<string name="other_source">Other</string>
|
||||
<string name="invalid_combination">Default can\'t be selected with other categories</string>
|
||||
<string name="added_to_library">The manga has been added to your library</string>
|
||||
<string name="action_global_search_hint">Global search…</string>
|
||||
<string name="no_results">No results found!</string>
|
||||
<string name="latest">Latest</string>
|
||||
<string name="browse">Browse</string>
|
||||
|
||||
<!-- Manga activity -->
|
||||
<string name="manga_not_in_db">This manga was removed from the database!</string>
|
||||
@@ -430,5 +438,4 @@
|
||||
<string name="download_notifier_text_only_wifi">No wifi connection available</string>
|
||||
<string name="download_notifier_no_network">No network connection available</string>
|
||||
<string name="download_notifier_download_paused">Download paused</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<!--========-->
|
||||
<!--Toolbars-->
|
||||
<!--========-->
|
||||
<style name="Theme.ActionBar" parent="@style/ThemeOverlay.AppCompat.ActionBar"/>
|
||||
<style name="Theme.ActionBar" parent="@style/ThemeOverlay.AppCompat.ActionBar" />
|
||||
|
||||
<style name="Theme.ActionBar.Light" parent="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
|
||||
<item name="popupTheme">@style/ThemeOverlay.AppCompat.Light</item>
|
||||
@@ -13,12 +13,12 @@
|
||||
<!--====-->
|
||||
<!--Tabs-->
|
||||
<!--====-->
|
||||
<style name="Theme.ActionBar.Tab" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/>
|
||||
<style name="Theme.ActionBar.Tab" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
|
||||
<!--===========-->
|
||||
<!--AlertDialog-->
|
||||
<!--===========-->
|
||||
<style name="Theme.AlertDialog"/>
|
||||
<style name="Theme.AlertDialog" />
|
||||
|
||||
<style name="Theme.AlertDialog.Light" parent="Theme.AppCompat.Light.Dialog.Alert">
|
||||
<item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
|
||||
@@ -35,7 +35,7 @@
|
||||
<!--==============-->
|
||||
<!--NavigationView-->
|
||||
<!--==============-->
|
||||
<style name="Theme.Widget.NavigationView"/>
|
||||
<style name="Theme.Widget.NavigationView" />
|
||||
|
||||
<style name="Theme.Widget.NavigationView.Dark">
|
||||
<item name="colorControlHighlight">@color/md_grey_900</item>
|
||||
@@ -85,6 +85,10 @@
|
||||
<item name="android:textSize">16sp</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Regular.SubHeading.Upper">
|
||||
<item name="android:textAllCaps">true</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Regular.SubHeading.Secondary">
|
||||
<item name="android:textColor">?android:attr/textColorSecondary</item>
|
||||
</style>
|
||||
@@ -105,6 +109,10 @@
|
||||
<item name="android:textSize">20sp</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Medium.Title.Upper">
|
||||
<item name="android:textAllCaps">true</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Medium.Title.Secondary">
|
||||
<item name="android:textColor">?android:attr/textColorSecondary</item>
|
||||
</style>
|
||||
@@ -130,7 +138,7 @@
|
||||
<!--=======-->
|
||||
<!--Widgets-->
|
||||
<!--=======-->
|
||||
<style name="Theme.Widget"/>
|
||||
<style name="Theme.Widget" />
|
||||
|
||||
<style name="Theme.Widget.FAB">
|
||||
<item name="android:layout_height">@dimen/fab_size</item>
|
||||
@@ -147,10 +155,16 @@
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:padding">@dimen/material_component_cards_top_and_bottom_padding</item>
|
||||
<item name="android:layout_marginTop">@dimen/material_component_cards_space_between_cards</item>
|
||||
<item name="android:layout_marginBottom">@dimen/material_component_cards_space_between_cards</item>
|
||||
<item name="android:layout_marginStart">@dimen/material_component_cards_space_between_cards</item>
|
||||
<item name="android:layout_marginEnd">@dimen/material_component_cards_space_between_cards</item>
|
||||
<item name="android:layout_marginTop">@dimen/material_component_cards_space_between_cards
|
||||
</item>
|
||||
<item name="android:layout_marginBottom">
|
||||
@dimen/material_component_cards_space_between_cards
|
||||
</item>
|
||||
<item name="android:layout_marginStart">
|
||||
@dimen/material_component_cards_space_between_cards
|
||||
</item>
|
||||
<item name="android:layout_marginEnd">@dimen/material_component_cards_space_between_cards
|
||||
</item>
|
||||
<item name="cardBackgroundColor">?attr/background_card</item>
|
||||
<item name="cardElevation">2dp</item>
|
||||
</style>
|
||||
@@ -161,21 +175,24 @@
|
||||
</style>
|
||||
|
||||
<style name="Theme.Widget.GridView">
|
||||
<item name="android:smoothScrollbar">true</item>
|
||||
<item name="android:numColumns">auto_fit</item>
|
||||
<item name="android:stretchMode">columnWidth</item>
|
||||
<item name="android:scrollbarStyle">outsideOverlay</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Widget.GridView.Catalogue">
|
||||
<item name="android:padding">5dp</item>
|
||||
<item name="android:clipToPadding">false</item>
|
||||
<item name="android:gravity">top|left</item>
|
||||
<item name="android:smoothScrollbar">true</item>
|
||||
<item name="android:cacheColorHint">?android:attr/textColorHint</item>
|
||||
<item name="android:fastScrollEnabled">true</item>
|
||||
<item name="android:horizontalSpacing">0dp</item>
|
||||
<item name="android:verticalSpacing">0dp</item>
|
||||
<item name="android:numColumns">auto_fit</item>
|
||||
<item name="android:stretchMode">columnWidth</item>
|
||||
<item name="android:scrollbarStyle">outsideOverlay</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="Theme.Widget.CheckBox"/>
|
||||
<style name="Theme.Widget.CheckBox" />
|
||||
|
||||
<style name="Theme.Widget.CheckBox.Light" parent="TextAppearance.Regular.Body1.Light">
|
||||
<item name="buttonTint">@color/md_white_1000</item>
|
||||
@@ -212,8 +229,7 @@
|
||||
<item name="nnf_toolbarTheme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="FilePickerAlertDialogTheme" parent="Theme.AppCompat.Light.Dialog.Alert">
|
||||
</style>
|
||||
<style name="FilePickerAlertDialogTheme" parent="Theme.AppCompat.Light.Dialog.Alert"></style>
|
||||
|
||||
<style name="reader_settings_popup_animation">
|
||||
<item name="android:windowEnterAnimation">@anim/enter_from_right</item>
|
||||
@@ -226,5 +242,4 @@
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user