mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-30 22:07:57 +01:00 
			
		
		
		
	Added circular thumbnails to the catalogue list view, like the ones in the library list view (#616)
* Added circular thumbnails to the catalogue list view, like the ones in the library list view * Moved setImage to CatalogueHolder parent class and adapted the code so that when the manga is initialized, the thumbnail is set both in the case of grid and list * In catalog, when switching between grid and list, initialize mangas only if going to grid view or if over wifi
This commit is contained in:
		
				
					committed by
					
						 Bram van de Kerkhof
						Bram van de Kerkhof
					
				
			
			
				
	
			
			
			
						parent
						
							d0260acd3d
						
					
				
				
					commit
					2c8790c545
				
			| @@ -1,17 +1,57 @@ | ||||
| <?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="?android:listPreferredItemHeightSmall" | ||||
|     android:layout_height="@dimen/material_component_lists_single_line_with_avatar_height" | ||||
|     android:background="?attr/selectable_list_drawable"> | ||||
|  | ||||
|     <TextView | ||||
|         android:id="@+id/title" | ||||
|         style="@style/TextAppearance.Regular.Body1" | ||||
|     <de.hdodenhof.circleimageview.CircleImageView | ||||
|         android:id="@+id/thumbnail" | ||||
|         android:layout_width="@dimen/material_component_lists_single_line_with_avatar_height" | ||||
|         android:layout_height="@dimen/material_component_lists_single_line_with_avatar_height" | ||||
|         android:layout_gravity="center_vertical" | ||||
|         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"/> | ||||
|  | ||||
|     <RelativeLayout | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:layout_gravity="center_vertical" | ||||
|         android:paddingLeft="?android:listPreferredItemPaddingLeft" | ||||
|         android:paddingRight="?android:listPreferredItemPaddingLeft"/> | ||||
|         android:paddingLeft="@dimen/material_component_lists_text_left_padding" | ||||
|         android:paddingStart="@dimen/material_component_lists_text_left_padding" | ||||
|         android:paddingRight="@dimen/material_component_lists_right_padding" | ||||
|         android:paddingEnd="@dimen/material_component_lists_right_padding"> | ||||
|  | ||||
|         <TextView | ||||
|             android:id="@+id/unread_text" | ||||
|             style="@style/TextAppearance.Regular.Caption.Hint" | ||||
|             android:layout_width="wrap_content" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_alignParentRight="true" | ||||
|             android:layout_alignParentEnd="true" | ||||
|             android:layout_centerVertical="true" | ||||
|             android:paddingStart="4dp" | ||||
|             android:paddingLeft="4dp" | ||||
|             android:maxLines="1" | ||||
|             android:textAppearance="@style/TextAppearance.Regular.Caption.Hint" | ||||
|             android:visibility="gone" | ||||
|             tools:text="22"/> | ||||
|  | ||||
|         <TextView | ||||
|             android:id="@+id/title" | ||||
|             style="@style/TextAppearance.Regular.SubHeading" | ||||
|             android:layout_toLeftOf="@id/unread_text" | ||||
|             android:layout_toStartOf="@id/unread_text" | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:maxLines="1" | ||||
|             android:ellipsize="end" | ||||
|             tools:text="Manga title"/> | ||||
|  | ||||
|     </RelativeLayout> | ||||
|  | ||||
| </FrameLayout> | ||||
| @@ -1,56 +0,0 @@ | ||||
| <?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="@dimen/material_component_lists_single_line_with_avatar_height" | ||||
|     android:background="?attr/selectable_list_drawable"> | ||||
|  | ||||
|     <de.hdodenhof.circleimageview.CircleImageView | ||||
|         android:id="@+id/thumbnail" | ||||
|         android:layout_width="@dimen/material_component_lists_single_line_with_avatar_height" | ||||
|         android:layout_height="@dimen/material_component_lists_single_line_with_avatar_height" | ||||
|         android:layout_gravity="center_vertical" | ||||
|         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"/> | ||||
|  | ||||
|     <RelativeLayout | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:layout_gravity="center_vertical" | ||||
|         android:paddingLeft="@dimen/material_component_lists_text_left_padding" | ||||
|         android:paddingStart="@dimen/material_component_lists_text_left_padding" | ||||
|         android:paddingRight="@dimen/material_component_lists_right_padding" | ||||
|         android:paddingEnd="@dimen/material_component_lists_right_padding"> | ||||
|  | ||||
|         <TextView | ||||
|             android:id="@+id/unread_text" | ||||
|             style="@style/TextAppearance.Regular.Caption.Hint" | ||||
|             android:layout_width="wrap_content" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_alignParentRight="true" | ||||
|             android:layout_alignParentEnd="true" | ||||
|             android:layout_centerVertical="true" | ||||
|             android:paddingStart="4dp" | ||||
|             android:paddingLeft="4dp" | ||||
|             android:maxLines="1" | ||||
|             android:textAppearance="@style/TextAppearance.Regular.Caption.Hint" | ||||
|             tools:text="22"/> | ||||
|  | ||||
|         <TextView | ||||
|             android:id="@+id/title" | ||||
|             style="@style/TextAppearance.Regular.SubHeading" | ||||
|             android:layout_toLeftOf="@id/unread_text" | ||||
|             android:layout_toStartOf="@id/unread_text" | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:maxLines="1" | ||||
|             android:ellipsize="end" | ||||
|             tools:text="Manga title"/> | ||||
|  | ||||
|     </RelativeLayout> | ||||
|  | ||||
| </FrameLayout> | ||||
| @@ -5,5 +5,4 @@ | ||||
|     android:id="@+id/library_list" | ||||
|     android:layout_width="match_parent" | ||||
|     android:layout_height="match_parent" | ||||
|     tools:listitem="@layout/item_library_list" /> | ||||
|  | ||||
|     tools:listitem="@layout/item_catalogue_list" /> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user