mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-30 22:07:57 +01:00 
			
		
		
		
	Added recently read tab (#316)
This commit is contained in:
		
							
								
								
									
										9
									
								
								app/src/main/res/drawable/ic_glasses_black_128dp.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								app/src/main/res/drawable/ic_glasses_black_128dp.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|         android:width="128dp" | ||||
|         android:height="128dp" | ||||
|         android:viewportWidth="24.0" | ||||
|         android:viewportHeight="24.0"> | ||||
|     <path | ||||
|         android:fillColor="#FF000000" | ||||
|         android:pathData="M3,10C2.76,10 2.55,10.09 2.41,10.25C2.27,10.4 2.21,10.62 2.24,10.86L2.74,13.85C2.82,14.5 3.4,15 4,15H7C7.64,15 8.36,14.44 8.5,13.82L9.56,10.63C9.6,10.5 9.57,10.31 9.5,10.19C9.39,10.07 9.22,10 9,10H3M7,17H4C2.38,17 0.96,15.74 0.76,14.14L0.26,11.15C0.15,10.3 0.39,9.5 0.91,8.92C1.43,8.34 2.19,8 3,8H9C9.83,8 10.58,8.35 11.06,8.96C11.17,9.11 11.27,9.27 11.35,9.45C11.78,9.36 12.22,9.36 12.64,9.45C12.72,9.27 12.82,9.11 12.94,8.96C13.41,8.35 14.16,8 15,8H21C21.81,8 22.57,8.34 23.09,8.92C23.6,9.5 23.84,10.3 23.74,11.11L23.23,14.18C23.04,15.74 21.61,17 20,17H17C15.44,17 13.92,15.81 13.54,14.3L12.64,11.59C12.26,11.31 11.73,11.31 11.35,11.59L10.43,14.37C10.07,15.82 8.56,17 7,17M15,10C14.78,10 14.61,10.07 14.5,10.19C14.42,10.31 14.4,10.5 14.45,10.7L15.46,13.75C15.64,14.44 16.36,15 17,15H20C20.59,15 21.18,14.5 21.25,13.89L21.76,10.82C21.79,10.62 21.73,10.4 21.59,10.25C21.45,10.09 21.24,10 21,10H15Z"/> | ||||
| </vector> | ||||
							
								
								
									
										9
									
								
								app/src/main/res/drawable/ic_glasses_black_24dp.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								app/src/main/res/drawable/ic_glasses_black_24dp.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|         android:width="24dp" | ||||
|         android:height="24dp" | ||||
|         android:viewportWidth="24.0" | ||||
|         android:viewportHeight="24.0"> | ||||
|     <path | ||||
|         android:fillColor="#FF000000" | ||||
|         android:pathData="M3,10C2.76,10 2.55,10.09 2.41,10.25C2.27,10.4 2.21,10.62 2.24,10.86L2.74,13.85C2.82,14.5 3.4,15 4,15H7C7.64,15 8.36,14.44 8.5,13.82L9.56,10.63C9.6,10.5 9.57,10.31 9.5,10.19C9.39,10.07 9.22,10 9,10H3M7,17H4C2.38,17 0.96,15.74 0.76,14.14L0.26,11.15C0.15,10.3 0.39,9.5 0.91,8.92C1.43,8.34 2.19,8 3,8H9C9.83,8 10.58,8.35 11.06,8.96C11.17,9.11 11.27,9.27 11.35,9.45C11.78,9.36 12.22,9.36 12.64,9.45C12.72,9.27 12.82,9.11 12.94,8.96C13.41,8.35 14.16,8 15,8H21C21.81,8 22.57,8.34 23.09,8.92C23.6,9.5 23.84,10.3 23.74,11.11L23.23,14.18C23.04,15.74 21.61,17 20,17H17C15.44,17 13.92,15.81 13.54,14.3L12.64,11.59C12.26,11.31 11.73,11.31 11.35,11.59L10.43,14.37C10.07,15.82 8.56,17 7,17M15,10C14.78,10 14.61,10.07 14.5,10.19C14.42,10.31 14.4,10.5 14.45,10.7L15.46,13.75C15.64,14.44 16.36,15 17,15H20C20.59,15 21.18,14.5 21.25,13.89L21.76,10.82C21.79,10.62 21.73,10.4 21.59,10.25C21.45,10.09 21.24,10 21,10H15Z"/> | ||||
| </vector> | ||||
| @@ -1,9 +0,0 @@ | ||||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|         android:width="128dp" | ||||
|         android:height="128dp" | ||||
|         android:viewportWidth="24.0" | ||||
|         android:viewportHeight="24.0"> | ||||
|     <path | ||||
|         android:fillColor="#FF000000" | ||||
|         android:pathData="M13,3c-4.97,0 -9,4.03 -9,9L1,12l3.89,3.89 0.07,0.14L9,12L6,12c0,-3.87 3.13,-7 7,-7s7,3.13 7,7 -3.13,7 -7,7c-1.93,0 -3.68,-0.79 -4.94,-2.06l-1.42,1.42C8.27,19.99 10.51,21 13,21c4.97,0 9,-4.03 9,-9s-4.03,-9 -9,-9zM12,8v5l4.28,2.54 0.72,-1.21 -3.5,-2.08L13.5,8L12,8z"/> | ||||
| </vector> | ||||
| @@ -1,9 +0,0 @@ | ||||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|         android:width="24dp" | ||||
|         android:height="24dp" | ||||
|         android:viewportWidth="24.0" | ||||
|         android:viewportHeight="24.0"> | ||||
|     <path | ||||
|         android:fillColor="#FF000000" | ||||
|         android:pathData="M13,3c-4.97,0 -9,4.03 -9,9L1,12l3.89,3.89 0.07,0.14L9,12L6,12c0,-3.87 3.13,-7 7,-7s7,3.13 7,7 -3.13,7 -7,7c-1.93,0 -3.68,-0.79 -4.94,-2.06l-1.42,1.42C8.27,19.99 10.51,21 13,21c4.97,0 9,-4.03 9,-9s-4.03,-9 -9,-9zM12,8v5l4.28,2.54 0.72,-1.21 -3.5,-2.08L13.5,8L12,8z"/> | ||||
| </vector> | ||||
							
								
								
									
										9
									
								
								app/src/main/res/drawable/ic_update_black_128dp.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								app/src/main/res/drawable/ic_update_black_128dp.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|         android:width="128dp" | ||||
|         android:height="128dp" | ||||
|         android:viewportWidth="24.0" | ||||
|         android:viewportHeight="24.0"> | ||||
|     <path | ||||
|         android:fillColor="#FF000000" | ||||
|         android:pathData="M21,10.12h-6.78l2.74,-2.82c-2.73,-2.7 -7.15,-2.8 -9.88,-0.1 -2.73,2.71 -2.73,7.08 0,9.79 2.73,2.71 7.15,2.71 9.88,0C18.32,15.65 19,14.08 19,12.1h2c0,1.98 -0.88,4.55 -2.64,6.29 -3.51,3.48 -9.21,3.48 -12.72,0 -3.5,-3.47 -3.53,-9.11 -0.02,-12.58 3.51,-3.47 9.14,-3.47 12.65,0L21,3v7.12zM12.5,8v4.25l3.5,2.08 -0.72,1.21L11,13V8h1.5z"/> | ||||
| </vector> | ||||
							
								
								
									
										9
									
								
								app/src/main/res/drawable/ic_update_black_24dp.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								app/src/main/res/drawable/ic_update_black_24dp.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|         android:width="24dp" | ||||
|         android:height="24dp" | ||||
|         android:viewportWidth="24.0" | ||||
|         android:viewportHeight="24.0"> | ||||
|     <path | ||||
|         android:fillColor="#FF000000" | ||||
|         android:pathData="M21,10.12h-6.78l2.74,-2.82c-2.73,-2.7 -7.15,-2.8 -9.88,-0.1 -2.73,2.71 -2.73,7.08 0,9.79 2.73,2.71 7.15,2.71 9.88,0C18.32,15.65 19,14.08 19,12.1h2c0,1.98 -0.88,4.55 -2.64,6.29 -3.51,3.48 -9.21,3.48 -12.72,0 -3.5,-3.47 -3.53,-9.11 -0.02,-12.58 3.51,-3.47 9.14,-3.47 12.65,0L21,3v7.12zM12.5,8v4.25l3.5,2.08 -0.72,1.21L11,13V8h1.5z"/> | ||||
| </vector> | ||||
							
								
								
									
										22
									
								
								app/src/main/res/layout/dialog_remove_recently.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								app/src/main/res/layout/dialog_remove_recently.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,22 @@ | ||||
| <?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="wrap_content" | ||||
|               android:orientation="vertical" | ||||
|               android:padding="@dimen/activity_vertical_margin"> | ||||
|  | ||||
|     <TextView | ||||
|         android:layout_width="wrap_content" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:text="@string/dialog_remove_recently_description" | ||||
|         android:textAppearance="@style/TextAppearance.Regular.Body1"/> | ||||
|  | ||||
|  | ||||
|     <CheckBox | ||||
|         android:id="@+id/removeAll" | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:layout_marginTop="18dp" | ||||
|         android:text="@string/dialog_remove_recently_reset"/> | ||||
|  | ||||
| </LinearLayout> | ||||
| @@ -10,6 +10,8 @@ | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="match_parent" | ||||
|         android:descendantFocusability="blocksDescendants" | ||||
|         tools:listitem="@layout/item_recent_chapter"/> | ||||
|         tools:listitem="@layout/item_recent_chapters"> | ||||
|  | ||||
|     </android.support.v7.widget.RecyclerView> | ||||
|  | ||||
| </RelativeLayout> | ||||
							
								
								
									
										16
									
								
								app/src/main/res/layout/fragment_recent_manga.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								app/src/main/res/layout/fragment_recent_manga.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <RelativeLayout 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:orientation="vertical"> | ||||
|  | ||||
|     <android.support.v7.widget.RecyclerView | ||||
|         android:id="@+id/recycler" | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="match_parent" | ||||
|         tools:listitem="@layout/item_recent_manga"> | ||||
|  | ||||
|     </android.support.v7.widget.RecyclerView> | ||||
|  | ||||
| </RelativeLayout> | ||||
							
								
								
									
										82
									
								
								app/src/main/res/layout/item_recent_manga.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										82
									
								
								app/src/main/res/layout/item_recent_manga.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,82 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <android.support.v7.widget.CardView | ||||
|     xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|     android:id="@+id/cv_manga" | ||||
|     style="@style/Theme.Widget.CardView" | ||||
|     android:layout_width="match_parent" | ||||
|     android:layout_height="wrap_content" | ||||
|     > | ||||
|  | ||||
|     <LinearLayout | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="150dp" | ||||
|         android:orientation="horizontal"> | ||||
|  | ||||
|         <ImageView | ||||
|             android:id="@+id/cover" | ||||
|             android:layout_width="100dp" | ||||
|             android:layout_height="match_parent" | ||||
|             android:clickable="true" | ||||
|             android:contentDescription="@string/description_cover" | ||||
|             android:scaleType="centerCrop"/> | ||||
|  | ||||
|         <RelativeLayout | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="match_parent" | ||||
|             android:orientation="vertical"> | ||||
|  | ||||
|             <RelativeLayout | ||||
|                 android:layout_width="match_parent" | ||||
|                 android:layout_height="match_parent" | ||||
|                 android:orientation="vertical" | ||||
|                 android:padding="@dimen/card_margin"> | ||||
|  | ||||
|                 <TextView | ||||
|                     android:id="@+id/manga_title" | ||||
|                     android:layout_width="match_parent" | ||||
|                     android:layout_height="wrap_content" | ||||
|                     android:maxLines="2" | ||||
|                     android:textAppearance="@style/TextAppearance.Medium.Title"/> | ||||
|  | ||||
|                 <TextView | ||||
|                     android:id="@+id/manga_source" | ||||
|                     android:layout_width="match_parent" | ||||
|                     android:layout_height="wrap_content" | ||||
|                     android:layout_below="@id/manga_title" | ||||
|                     android:textAppearance="@style/TextAppearance.Medium.Body2"/> | ||||
|  | ||||
|                 <TextView | ||||
|                     android:id="@+id/last_read" | ||||
|                     android:layout_width="match_parent" | ||||
|                     android:layout_height="wrap_content" | ||||
|                     android:layout_below="@id/manga_source" | ||||
|                     android:textAppearance="@style/TextAppearance.Medium.Body2.Hint"/> | ||||
|             </RelativeLayout> | ||||
|  | ||||
|             <TextView | ||||
|                 android:id="@+id/remove" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:layout_alignParentBottom="true" | ||||
|                 android:layout_marginLeft="8dp" | ||||
|                 android:layout_marginStart="8dp" | ||||
|                 android:background="?attr/selectable_list_drawable" | ||||
|                 android:clickable="true" | ||||
|                 android:padding="8dp" | ||||
|                 android:text="@string/action_remove" | ||||
|                 android:textAppearance="@style/TextAppearance.Medium.Button.Negative"/> | ||||
|  | ||||
|             <TextView | ||||
|                 android:id="@+id/resume" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:layout_alignParentBottom="true" | ||||
|                 android:layout_toEndOf="@id/remove" | ||||
|                 android:layout_toRightOf="@id/remove" | ||||
|                 android:background="?attr/selectable_list_drawable" | ||||
|                 android:padding="8dp" | ||||
|                 android:text="@string/action_resume" | ||||
|                 android:textAppearance="@style/TextAppearance.Medium.Button"/> | ||||
|         </RelativeLayout> | ||||
|     </LinearLayout> | ||||
| </android.support.v7.widget.CardView> | ||||
| @@ -7,10 +7,15 @@ | ||||
|             android:id="@+id/nav_drawer_library" | ||||
|             android:icon="@drawable/ic_book_black_24dp" | ||||
|             android:title="@string/label_library" /> | ||||
|         <item | ||||
|             android:id="@+id/nav_drawer_recent_manga" | ||||
|             android:icon="@drawable/ic_glasses_black_24dp" | ||||
|             android:title="@string/label_recent_manga"/> | ||||
|         <item | ||||
|             android:id="@+id/nav_drawer_recent_updates" | ||||
|             android:icon="@drawable/ic_history_black_24dp" | ||||
|             android:icon="@drawable/ic_update_black_24dp" | ||||
|             android:title="@string/label_recent_updates" /> | ||||
|  | ||||
|         <item | ||||
|             android:id="@+id/nav_drawer_catalogues" | ||||
|             android:icon="@drawable/ic_explore_black_24dp" | ||||
|   | ||||
| @@ -136,4 +136,12 @@ | ||||
|         <item>ac</item> | ||||
|     </string-array> | ||||
|  | ||||
|     <string-array name="remove_recently_read"> | ||||
|         <item>@string/scale_type_fit_screen</item> | ||||
|     </string-array> | ||||
|  | ||||
|     <string-array name="remove_recently_read_values"> | ||||
|         <item>remove</item> | ||||
|     </string-array> | ||||
|  | ||||
| </resources> | ||||
| @@ -70,4 +70,6 @@ | ||||
|  | ||||
|     <color name="md_blue_grey_900">#263238</color> | ||||
|  | ||||
|     <color name="md_red_500">#F44336</color> | ||||
|  | ||||
| </resources> | ||||
| @@ -7,6 +7,7 @@ | ||||
|     <string name="label_settings">Settings</string> | ||||
|     <string name="label_download_queue">Download queue</string> | ||||
|     <string name="label_library">My library</string> | ||||
|     <string name="label_recent_manga">Recently read</string> | ||||
|     <string name="label_recent_updates">Recent updates</string> | ||||
|     <string name="label_catalogues">Catalogues</string> | ||||
|     <string name="label_categories">Categories</string> | ||||
| @@ -46,6 +47,8 @@ | ||||
|     <string name="action_previous_chapter">Previous chapter</string> | ||||
|     <string name="action_next_chapter">Next chapter</string> | ||||
|     <string name="action_retry">Retry</string> | ||||
|     <string name="action_remove">Remove</string> | ||||
|     <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_cancel">Cancel</string> | ||||
| @@ -248,6 +251,10 @@ | ||||
|     <string name="status">Status</string> | ||||
|     <string name="chapters">Chapters</string> | ||||
|  | ||||
|     <!-- Dialog remove recently view --> | ||||
|     <string name="dialog_remove_recently_description">This will remove the read date of this chapter. Are you sure?</string> | ||||
|     <string name="dialog_remove_recently_reset">Reset all chapters for this manga</string> | ||||
|  | ||||
|  | ||||
|     <!-- Reader activity --> | ||||
|     <string name="downloading">Downloading…</string> | ||||
| @@ -266,6 +273,9 @@ | ||||
|     <string name="backup_completed">Backup successfully restored</string> | ||||
|     <string name="restore_please_wait">Restoring backup. Please wait…</string> | ||||
|  | ||||
|     <!-- Recent manga fragment --> | ||||
|     <string name="recent_manga_source">%1$s - Ch.%2$s</string> | ||||
|  | ||||
|     <!-- Downloads activity and service --> | ||||
|     <string name="download_queue_error">An error occurred while downloading chapters. You can try again in the downloads section</string> | ||||
|  | ||||
| @@ -302,12 +312,13 @@ | ||||
|     <string name="update_check_notification_update_available">Update available</string> | ||||
|  | ||||
|     <!--Content Description--> | ||||
|     <string name="description_backdrop">Backdrop image of selected manga</string> | ||||
|     <string name="description_cover">Cover of selected manga</string> | ||||
|     <string name="description_backdrop">Backdrop image of manga</string> | ||||
|     <string name="description_cover">Cover of manga</string> | ||||
|  | ||||
|     <!-- Information Text --> | ||||
|     <string name="information_no_downloads">No downloads</string> | ||||
|     <string name="information_no_recent">No recent chapters</string> | ||||
|     <string name="information_no_recent_manga">No recently read manga</string> | ||||
|     <string name="information_empty_library">Empty library</string> | ||||
|  | ||||
|     <!-- Download Notification --> | ||||
| @@ -316,4 +327,5 @@ | ||||
|     <string name="download_notifier_page_error">A page is missing in directory</string> | ||||
|     <string name="download_notifier_page_ready_error">A page is not loaded</string> | ||||
|     <string name="download_notifier_text_only_wifi">No wifi connection available</string> | ||||
|  | ||||
| </resources> | ||||
|   | ||||
| @@ -121,6 +121,10 @@ | ||||
|         <item name="android:textColor">?attr/colorAccent</item> | ||||
|     </style> | ||||
|  | ||||
|     <style name="TextAppearance.Medium.Button.Negative"> | ||||
|         <item name="android:textColor">@color/md_red_500</item> | ||||
|     </style> | ||||
|  | ||||
|     <!--=======--> | ||||
|     <!--Widgets--> | ||||
|     <!--=======--> | ||||
| @@ -137,6 +141,12 @@ | ||||
|         <item name="layout_behavior">eu.kanade.tachiyomi.widget.FABAnimationUpDown</item> | ||||
|     </style> | ||||
|  | ||||
|     <style name="Theme.Widget.CardView"> | ||||
|         <item name="android:layout_marginRight">@dimen/card_margin</item> | ||||
|         <item name="android:layout_marginLeft">@dimen/card_margin</item> | ||||
|         <item name="android:layout_marginTop">@dimen/card_margin</item> | ||||
|     </style> | ||||
|  | ||||
|     <style name="Theme.Widget.GridView"> | ||||
|         <item name="android:padding">5dp</item> | ||||
|         <item name="android:clipToPadding">false</item> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user