mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-30 22:07:57 +01:00 
			
		
		
		
	Add drawer to filter and sort the library (#570)
* Add additional drawer to filter and sort the library * Tint icon when there's a filter active * Comments and minor changes
This commit is contained in:
		
							
								
								
									
										8
									
								
								app/src/main/res/drawable/empty_drawable_32dp.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								app/src/main/res/drawable/empty_drawable_32dp.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| <shape | ||||
|     xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|     android:shape="rectangle"> | ||||
|     <solid android:color="@android:color/transparent"/> | ||||
|     <size | ||||
|         android:width="32dp" | ||||
|         android:height="32dp" /> | ||||
| </shape> | ||||
| @@ -0,0 +1,9 @@ | ||||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|         android:width="32dp" | ||||
|         android:height="32dp" | ||||
|         android:viewportWidth="24.0" | ||||
|         android:viewportHeight="24.0"> | ||||
|     <path | ||||
|         android:fillColor="#FF000000" | ||||
|         android:pathData="M7.41,7.84L12,12.42l4.59,-4.58L18,9.25l-6,6 -6,-6z"/> | ||||
| </vector> | ||||
| @@ -0,0 +1,9 @@ | ||||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|         android:width="32dp" | ||||
|         android:height="32dp" | ||||
|         android:viewportWidth="24.0" | ||||
|         android:viewportHeight="24.0"> | ||||
|     <path | ||||
|         android:fillColor="#FF000000" | ||||
|         android:pathData="M7.41,15.41L12,10.83l4.59,4.58L18,14l-6,-6 -6,6z"/> | ||||
| </vector> | ||||
							
								
								
									
										8
									
								
								app/src/main/res/layout/library_drawer.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								app/src/main/res/layout/library_drawer.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <eu.kanade.tachiyomi.ui.library.LibraryNavigationView | ||||
|     xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|     android:id="@+id/nav_view2" | ||||
|     android:layout_width="wrap_content" | ||||
|     android:layout_height="match_parent" | ||||
|     android:layout_gravity="end" | ||||
|     android:fitsSystemWindows="false" /> | ||||
							
								
								
									
										23
									
								
								app/src/main/res/layout/navigation_view_checkbox.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								app/src/main/res/layout/navigation_view_checkbox.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,23 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <LinearLayout | ||||
|     xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|     android:layout_width="match_parent" | ||||
|     android:layout_height="?attr/listPreferredItemHeightSmall" | ||||
|     android:paddingLeft="?attr/listPreferredItemPaddingLeft" | ||||
|     android:paddingRight="?attr/listPreferredItemPaddingRight" | ||||
|     android:foreground="?attr/selectableItemBackground" | ||||
|     android:focusable="true"> | ||||
|  | ||||
|     <CheckBox | ||||
|         android:id="@+id/nav_view_item" | ||||
|         android:layout_width="0dp" | ||||
|         android:layout_height="match_parent" | ||||
|         android:layout_weight="1" | ||||
|         android:paddingLeft="@dimen/material_component_lists_icon_left_padding" | ||||
|         android:background="@android:color/transparent" | ||||
|         android:gravity="center_vertical|start" | ||||
|         android:maxLines="1" | ||||
|         android:clickable="false" | ||||
|         android:textAppearance="@style/TextAppearance.AppCompat.Body2" /> | ||||
|  | ||||
| </LinearLayout> | ||||
							
								
								
									
										21
									
								
								app/src/main/res/layout/navigation_view_checkedtext.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								app/src/main/res/layout/navigation_view_checkedtext.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,21 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <LinearLayout | ||||
|     xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|     android:layout_width="match_parent" | ||||
|     android:layout_height="?attr/listPreferredItemHeightSmall" | ||||
|     android:paddingLeft="?attr/listPreferredItemPaddingLeft" | ||||
|     android:paddingRight="?attr/listPreferredItemPaddingRight" | ||||
|     android:foreground="?attr/selectableItemBackground" | ||||
|     android:focusable="true"> | ||||
|  | ||||
|     <CheckedTextView | ||||
|         android:id="@+id/nav_view_item" | ||||
|         android:layout_width="0dp" | ||||
|         android:layout_height="match_parent" | ||||
|         android:layout_weight="1" | ||||
|         android:drawablePadding="@dimen/material_component_lists_icon_left_padding" | ||||
|         android:gravity="center_vertical|start" | ||||
|         android:maxLines="1" | ||||
|         android:textAppearance="@style/TextAppearance.AppCompat.Body2" /> | ||||
|  | ||||
| </LinearLayout> | ||||
							
								
								
									
										23
									
								
								app/src/main/res/layout/navigation_view_radio.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								app/src/main/res/layout/navigation_view_radio.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,23 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <LinearLayout | ||||
|     xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|     android:layout_width="match_parent" | ||||
|     android:layout_height="?attr/listPreferredItemHeightSmall" | ||||
|     android:paddingLeft="?attr/listPreferredItemPaddingLeft" | ||||
|     android:paddingRight="?attr/listPreferredItemPaddingRight" | ||||
|     android:foreground="?attr/selectableItemBackground" | ||||
|     android:focusable="true"> | ||||
|  | ||||
|     <RadioButton | ||||
|         android:id="@+id/nav_view_item" | ||||
|         android:layout_width="0dp" | ||||
|         android:layout_height="match_parent" | ||||
|         android:layout_weight="1" | ||||
|         android:paddingLeft="@dimen/material_component_lists_icon_left_padding" | ||||
|         android:background="@android:color/transparent" | ||||
|         android:gravity="center_vertical|start" | ||||
|         android:maxLines="1" | ||||
|         android:clickable="false" | ||||
|         android:textAppearance="@style/TextAppearance.AppCompat.Body2" /> | ||||
|  | ||||
| </LinearLayout> | ||||
| @@ -14,44 +14,7 @@ | ||||
|         android:id="@+id/action_filter" | ||||
|         android:icon="@drawable/ic_filter_list_white_24dp" | ||||
|         android:title="@string/action_filter" | ||||
|         app:showAsAction="ifRoom"> | ||||
|         <menu> | ||||
|             <item | ||||
|                 android:id="@+id/action_filter_downloaded" | ||||
|                 android:checkable="true" | ||||
|                 android:title="@string/action_filter_downloaded"/> | ||||
|             <item | ||||
|                 android:id="@+id/action_filter_unread" | ||||
|                 android:checkable="true" | ||||
|                 android:title="@string/action_filter_unread"/> | ||||
|             <item | ||||
|                 android:id="@+id/action_filter_empty" | ||||
|                 android:title="@string/action_filter_empty"/> | ||||
|         </menu> | ||||
|     </item> | ||||
|  | ||||
|     <item | ||||
|         android:id="@+id/action_sort" | ||||
|         android:icon="@drawable/ic_sort_white_24dp" | ||||
|         android:title="@string/action_sort" | ||||
|         app:showAsAction="never" | ||||
|         > | ||||
|         <menu> | ||||
|             <group | ||||
|                 android:id="@+id/sort_group" | ||||
|                 android:checkableBehavior="single"> | ||||
|                 <item | ||||
|                     android:id="@+id/action_sort_alpha" | ||||
|                     android:title="@string/action_sort_alpha"/> | ||||
|                 <item | ||||
|                     android:id="@+id/action_sort_last_read" | ||||
|                     android:title="@string/action_sort_last_read"/> | ||||
|                 <item | ||||
|                     android:id="@+id/action_sort_last_updated" | ||||
|                     android:title="@string/action_sort_last_updated"/> | ||||
|             </group> | ||||
|         </menu> | ||||
|     </item> | ||||
|         app:showAsAction="ifRoom"/> | ||||
|  | ||||
|     <item | ||||
|         android:id="@+id/action_update_library" | ||||
| @@ -59,11 +22,6 @@ | ||||
|         android:title="@string/action_update_library" | ||||
|         app:showAsAction="ifRoom"/> | ||||
|  | ||||
|     <item | ||||
|         android:id="@+id/action_library_display_mode" | ||||
|         android:title="@string/action_display_mode" | ||||
|         app:showAsAction="never"/> | ||||
|  | ||||
|     <item | ||||
|         android:id="@+id/action_edit_categories" | ||||
|         android:title="@string/action_edit_categories" | ||||
|   | ||||
| @@ -60,6 +60,9 @@ | ||||
|     <string name="action_open_in_browser">Open in browser</string> | ||||
|     <string name="action_add_to_home_screen">Add to home screen</string> | ||||
|     <string name="action_display_mode">Change display mode</string> | ||||
|     <string name="action_display">Display</string> | ||||
|     <string name="action_display_grid">Grid</string> | ||||
|     <string name="action_display_list">List</string> | ||||
|     <string name="action_set_filter">Set filter</string> | ||||
|     <string name="action_cancel">Cancel</string> | ||||
|     <string name="action_sort">Sort</string> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user