mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-30 22:07:57 +01:00 
			
		
		
		
	Move chapter filter/sort/display settings into a sheet
This commit is contained in:
		| @@ -1,20 +1,38 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||||
| <androidx.constraintlayout.widget.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" | ||||
|     android:background="?attr/selectableItemBackground" | ||||
|     android:paddingStart="16dp" | ||||
|     android:paddingTop="16dp" | ||||
|     android:paddingTop="4dp" | ||||
|     android:paddingEnd="16dp" | ||||
|     android:paddingBottom="8dp" | ||||
|     android:paddingBottom="4dp" | ||||
|     tools:context=".ui.browse.source.browse.BrowseSourceController"> | ||||
|  | ||||
|     <TextView | ||||
|         android:id="@+id/chapters_label" | ||||
|         style="@style/TextAppearance.Regular.SubHeading" | ||||
|         android:layout_width="wrap_content" | ||||
|         android:layout_width="0dp" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:text="@string/chapters" | ||||
|         android:textIsSelectable="false" /> | ||||
|         android:textIsSelectable="false" | ||||
|         app:layout_constraintBottom_toBottomOf="parent" | ||||
|         app:layout_constraintEnd_toStartOf="@+id/btn_chapters_filter" | ||||
|         app:layout_constraintStart_toStartOf="parent" | ||||
|         app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
| </RelativeLayout> | ||||
|     <com.google.android.material.button.MaterialButton | ||||
|         android:id="@+id/btn_chapters_filter" | ||||
|         style="@style/Theme.Widget.Button.Icon" | ||||
|         android:layout_width="wrap_content" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:text="@string/action_filter" | ||||
|         app:icon="@drawable/ic_filter_list_24dp" | ||||
|         app:iconTint="?attr/colorOnPrimary" | ||||
|         app:layout_constraintBottom_toBottomOf="parent" | ||||
|         app:layout_constraintEnd_toEndOf="parent" | ||||
|         app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
| </androidx.constraintlayout.widget.ConstraintLayout> | ||||
|   | ||||
| @@ -1,114 +0,0 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <menu xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|     xmlns:app="http://schemas.android.com/apk/res-auto"> | ||||
|  | ||||
|     <item | ||||
|         android:id="@+id/action_filter" | ||||
|         android:icon="@drawable/ic_filter_list_24dp" | ||||
|         android:title="@string/action_filter" | ||||
|         app:iconTint="?attr/colorOnPrimary" | ||||
|         app:showAsAction="ifRoom"> | ||||
|         <menu> | ||||
|             <item | ||||
|                 android:id="@+id/action_filter_read" | ||||
|                 android:checkable="true" | ||||
|                 android:title="@string/action_filter_read" /> | ||||
|             <item | ||||
|                 android:id="@+id/action_filter_unread" | ||||
|                 android:checkable="true" | ||||
|                 android:title="@string/action_filter_unread" /> | ||||
|             <item | ||||
|                 android:id="@+id/action_filter_downloaded" | ||||
|                 android:checkable="true" | ||||
|                 android:title="@string/action_filter_downloaded" /> | ||||
|             <item | ||||
|                 android:id="@+id/action_filter_bookmarked" | ||||
|                 android:checkable="true" | ||||
|                 android:title="@string/action_filter_bookmarked" /> | ||||
|             <item | ||||
|                 android:id="@+id/action_filter_empty" | ||||
|                 android:title="@string/action_filter_empty" /> | ||||
|         </menu> | ||||
|     </item> | ||||
|  | ||||
|     <item | ||||
|         android:icon="@drawable/ic_sort_24dp" | ||||
|         android:title="@string/sorting_mode" | ||||
|         app:iconTint="?attr/colorOnPrimary" | ||||
|         app:showAsAction="ifRoom"> | ||||
|         <menu> | ||||
|             <group android:checkableBehavior="single"> | ||||
|                 <item | ||||
|                     android:id="@+id/sort_by_source" | ||||
|                     android:title="@string/sort_by_source" /> | ||||
|                 <item | ||||
|                     android:id="@+id/sort_by_number" | ||||
|                     android:title="@string/sort_by_number" /> | ||||
|                 <item | ||||
|                     android:id="@+id/sort_by_upload_date" | ||||
|                     android:title="@string/sort_by_upload_date" /> | ||||
|             </group> | ||||
|  | ||||
|             <item | ||||
|                 android:id="@+id/action_sort_descending" | ||||
|                 android:checkable="true" | ||||
|                 android:title="@string/action_sort_descending" /> | ||||
|         </menu> | ||||
|     </item> | ||||
|  | ||||
|     <item | ||||
|         android:title="@string/action_display_mode" | ||||
|         app:showAsAction="never"> | ||||
|         <menu> | ||||
|             <group android:checkableBehavior="single"> | ||||
|                 <item | ||||
|                     android:id="@+id/display_title" | ||||
|                     android:title="@string/show_title" /> | ||||
|                 <item | ||||
|                     android:id="@+id/display_chapter_number" | ||||
|                     android:title="@string/show_chapter_number" /> | ||||
|             </group> | ||||
|         </menu> | ||||
|     </item> | ||||
|  | ||||
|     <item | ||||
|         android:id="@+id/download_group" | ||||
|         android:title="@string/manga_download" | ||||
|         app:showAsAction="never"> | ||||
|         <menu> | ||||
|             <item | ||||
|                 android:id="@+id/download_next" | ||||
|                 android:title="@string/download_1" /> | ||||
|             <item | ||||
|                 android:id="@+id/download_next_5" | ||||
|                 android:title="@string/download_5" /> | ||||
|             <item | ||||
|                 android:id="@+id/download_next_10" | ||||
|                 android:title="@string/download_10" /> | ||||
|             <item | ||||
|                 android:id="@+id/download_custom" | ||||
|                 android:title="@string/download_custom" /> | ||||
|             <item | ||||
|                 android:id="@+id/download_unread" | ||||
|                 android:title="@string/download_unread" /> | ||||
|             <item | ||||
|                 android:id="@+id/download_all" | ||||
|                 android:title="@string/download_all" /> | ||||
|         </menu> | ||||
|     </item> | ||||
|  | ||||
|     <item | ||||
|         android:id="@+id/action_edit_categories" | ||||
|         android:title="@string/action_edit_categories" | ||||
|         app:showAsAction="never" /> | ||||
|  | ||||
|     <item | ||||
|         android:id="@+id/action_edit_cover" | ||||
|         android:title="@string/action_edit_cover" | ||||
|         app:showAsAction="never" /> | ||||
|  | ||||
|     <item | ||||
|         android:id="@+id/action_migrate" | ||||
|         android:title="@string/action_migrate" | ||||
|         app:showAsAction="never" /> | ||||
| </menu> | ||||
							
								
								
									
										47
									
								
								app/src/main/res/menu/manga.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								app/src/main/res/menu/manga.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,47 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <menu xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|     xmlns:app="http://schemas.android.com/apk/res-auto"> | ||||
|  | ||||
|     <item | ||||
|         android:id="@+id/download_group" | ||||
|         android:icon="@drawable/ic_get_app_24dp" | ||||
|         android:title="@string/manga_download" | ||||
|         app:iconTint="?attr/colorOnPrimary" | ||||
|         app:showAsAction="ifRoom"> | ||||
|         <menu> | ||||
|             <item | ||||
|                 android:id="@+id/download_next" | ||||
|                 android:title="@string/download_1" /> | ||||
|             <item | ||||
|                 android:id="@+id/download_next_5" | ||||
|                 android:title="@string/download_5" /> | ||||
|             <item | ||||
|                 android:id="@+id/download_next_10" | ||||
|                 android:title="@string/download_10" /> | ||||
|             <item | ||||
|                 android:id="@+id/download_custom" | ||||
|                 android:title="@string/download_custom" /> | ||||
|             <item | ||||
|                 android:id="@+id/download_unread" | ||||
|                 android:title="@string/download_unread" /> | ||||
|             <item | ||||
|                 android:id="@+id/download_all" | ||||
|                 android:title="@string/download_all" /> | ||||
|         </menu> | ||||
|     </item> | ||||
|  | ||||
|     <item | ||||
|         android:id="@+id/action_edit_categories" | ||||
|         android:title="@string/action_edit_categories" | ||||
|         app:showAsAction="never" /> | ||||
|  | ||||
|     <item | ||||
|         android:id="@+id/action_edit_cover" | ||||
|         android:title="@string/action_edit_cover" | ||||
|         app:showAsAction="never" /> | ||||
|  | ||||
|     <item | ||||
|         android:id="@+id/action_migrate" | ||||
|         android:title="@string/action_migrate" | ||||
|         app:showAsAction="never" /> | ||||
| </menu> | ||||
		Reference in New Issue
	
	Block a user