mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-30 22:07:57 +01:00 
			
		
		
		
	Add genre filter for catalogue (#428)
* Add genre filter for catalogue * Implement genre filter for batoto * hardcode filters for sources * swtich filter id to string * reset filters when switching sources * Add filter support to mangafox * Catalogue changes * Indefinite snackbar on error, use plain subscriptions in catalogue presenter
This commit is contained in:
		| @@ -1,48 +1,55 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|               xmlns:tools="http://schemas.android.com/tools" | ||||
|               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.CatalogueFragment"> | ||||
| <android.support.design.widget.CoordinatorLayout | ||||
|     xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|     xmlns:tools="http://schemas.android.com/tools" | ||||
|     android:layout_width="match_parent" | ||||
|     android:layout_height="match_parent"> | ||||
|  | ||||
|     <ProgressBar | ||||
|         android:id="@+id/progress" | ||||
|         style="?android:attr/progressBarStyleLarge" | ||||
|         android:layout_width="wrap_content" | ||||
|         android:layout_height="match_parent" | ||||
|         android:layout_gravity="center_vertical|center_horizontal" | ||||
|         android:visibility="gone"/> | ||||
|     <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.CatalogueFragment"> | ||||
|  | ||||
|  | ||||
|     <ViewSwitcher | ||||
|         android:id="@+id/switcher" | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="0dp" | ||||
|         android:layout_weight="1"> | ||||
|         <eu.kanade.tachiyomi.widget.AutofitRecyclerView | ||||
|             android:id="@+id/catalogue_grid" | ||||
|             style="@style/Theme.Widget.GridView" | ||||
|             android:layout_width="match_parent" | ||||
|         <ProgressBar | ||||
|             android:id="@+id/progress" | ||||
|             style="?android:attr/progressBarStyleLarge" | ||||
|             android:layout_width="wrap_content" | ||||
|             android:layout_height="match_parent" | ||||
|             android:columnWidth="140dp" | ||||
|             tools:listitem="@layout/item_catalogue_grid"/> | ||||
|             android:layout_gravity="center_vertical|center_horizontal" | ||||
|             android:visibility="gone"/> | ||||
|  | ||||
|         <android.support.v7.widget.RecyclerView | ||||
|             android:id="@+id/catalogue_list" | ||||
|  | ||||
|         <ViewSwitcher | ||||
|             android:id="@+id/switcher" | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="match_parent"/> | ||||
|             android:layout_height="0dp" | ||||
|             android:layout_weight="1"> | ||||
|             <eu.kanade.tachiyomi.widget.AutofitRecyclerView | ||||
|                 android:id="@+id/catalogue_grid" | ||||
|                 style="@style/Theme.Widget.GridView" | ||||
|                 android:layout_width="match_parent" | ||||
|                 android:layout_height="match_parent" | ||||
|                 android:columnWidth="140dp" | ||||
|                 tools:listitem="@layout/item_catalogue_grid"/> | ||||
|  | ||||
|     </ViewSwitcher> | ||||
|             <android.support.v7.widget.RecyclerView | ||||
|                 android:id="@+id/catalogue_list" | ||||
|                 android:layout_width="match_parent" | ||||
|                 android:layout_height="match_parent"/> | ||||
|  | ||||
|     <ProgressBar | ||||
|         android:id="@+id/progress_grid" | ||||
|         style="?android:attr/progressBarStyle" | ||||
|         android:layout_width="wrap_content" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:layout_gravity="center_vertical|center_horizontal" | ||||
|         android:visibility="gone"/> | ||||
|         </ViewSwitcher> | ||||
|  | ||||
| </LinearLayout> | ||||
|         <ProgressBar | ||||
|             android:id="@+id/progress_grid" | ||||
|             style="?android:attr/progressBarStyle" | ||||
|             android:layout_width="wrap_content" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_gravity="center_vertical|center_horizontal" | ||||
|             android:visibility="gone"/> | ||||
|  | ||||
|     </LinearLayout> | ||||
|  | ||||
| </android.support.design.widget.CoordinatorLayout> | ||||
| @@ -9,6 +9,12 @@ | ||||
|         app:showAsAction="collapseActionView|ifRoom" | ||||
|         app:actionViewClass="android.support.v7.widget.SearchView"/> | ||||
|  | ||||
|     <item | ||||
|         android:id="@+id/action_set_filter" | ||||
|         android:title="@string/action_set_filter" | ||||
|         android:icon="@drawable/ic_filter_list_white_24dp" | ||||
|         app:showAsAction="ifRoom"/> | ||||
|  | ||||
|     <item | ||||
|         android:id="@+id/action_display_mode" | ||||
|         android:title="@string/action_display_mode" | ||||
|   | ||||
| @@ -51,6 +51,7 @@ | ||||
|     <string name="action_resume">Resume</string> | ||||
|     <string name="action_open_in_browser">Open in browser</string> | ||||
|     <string name="action_display_mode">Change display mode</string> | ||||
|     <string name="action_set_filter">Set filter</string> | ||||
|     <string name="action_cancel">Cancel</string> | ||||
|     <string name="action_sort">Sort</string> | ||||
|     <string name="action_install">Install</string> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user