mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-31 06:17:57 +01:00 
			
		
		
		
	Convert Source tab to use Compose (#6987)
* Use Compose in Source tab * Replace hashCode with key function * Add ability to turn off pins moving on top of source list * Changes from review comments
This commit is contained in:
		| @@ -1,25 +0,0 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <FrameLayout 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"> | ||||
|  | ||||
|     <androidx.recyclerview.widget.RecyclerView | ||||
|         android:id="@+id/recycler" | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="match_parent" | ||||
|         android:clipToPadding="false" | ||||
|         android:paddingTop="8dp" | ||||
|         android:paddingBottom="@dimen/action_toolbar_list_padding" | ||||
|         tools:listitem="@layout/section_header_item" /> | ||||
|  | ||||
|     <eu.kanade.tachiyomi.widget.MaterialFastScroll | ||||
|         android:id="@+id/fast_scroller" | ||||
|         android:layout_width="wrap_content" | ||||
|         android:layout_height="match_parent" | ||||
|         android:layout_gravity="end" | ||||
|         app:fastScrollerBubbleEnabled="false" | ||||
|         tools:visibility="visible" /> | ||||
|  | ||||
| </FrameLayout> | ||||
| @@ -23,13 +23,14 @@ | ||||
|         android:id="@+id/title" | ||||
|         android:layout_width="0dp" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:layout_marginEnd="8dp" | ||||
|         android:ellipsize="end" | ||||
|         android:maxLines="1" | ||||
|         android:paddingStart="0dp" | ||||
|         android:paddingEnd="8dp" | ||||
|         android:textAppearance="?attr/textAppearanceBodyMedium" | ||||
|         app:layout_constraintBottom_toTopOf="@id/subtitle" | ||||
|         app:layout_constraintEnd_toStartOf="@+id/source_latest" | ||||
|         app:layout_constraintEnd_toEndOf="parent" | ||||
|         app:layout_constraintStart_toEndOf="@+id/image" | ||||
|         app:layout_constraintTop_toTopOf="parent" | ||||
|         app:layout_constraintVertical_chainStyle="packed" | ||||
| @@ -39,45 +40,15 @@ | ||||
|         android:id="@+id/subtitle" | ||||
|         android:layout_width="0dp" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:layout_marginEnd="8dp" | ||||
|         android:maxLines="1" | ||||
|         android:textAppearance="?attr/textAppearanceBodySmall" | ||||
|         android:visibility="gone" | ||||
|         app:layout_constraintBottom_toBottomOf="parent" | ||||
|         app:layout_constraintEnd_toStartOf="@+id/source_latest" | ||||
|         app:layout_constraintEnd_toEndOf="parent" | ||||
|         app:layout_constraintStart_toEndOf="@id/image" | ||||
|         app:layout_constraintTop_toBottomOf="@+id/title" | ||||
|         tools:text="English" | ||||
|         tools:visibility="visible" /> | ||||
|  | ||||
|     <Button | ||||
|         android:id="@+id/source_latest" | ||||
|         style="?attr/borderlessButtonStyle" | ||||
|         android:layout_width="wrap_content" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:maxHeight="48dp" | ||||
|         android:minWidth="0dp" | ||||
|         android:minHeight="48dp" | ||||
|         android:paddingStart="16dp" | ||||
|         android:paddingEnd="16dp" | ||||
|         android:text="@string/latest" | ||||
|         android:visibility="gone" | ||||
|         app:layout_constraintBottom_toBottomOf="parent" | ||||
|         app:layout_constraintEnd_toStartOf="@+id/pin" | ||||
|         app:layout_constraintTop_toTopOf="parent" | ||||
|         tools:visibility="visible" /> | ||||
|  | ||||
|     <ImageButton | ||||
|         android:id="@+id/pin" | ||||
|         android:layout_width="40dp" | ||||
|         android:layout_height="40dp" | ||||
|         android:layout_marginEnd="8dp" | ||||
|         android:background="?attr/selectableItemBackgroundBorderless" | ||||
|         android:contentDescription="@string/action_pin" | ||||
|         android:visibility="gone" | ||||
|         app:layout_constraintBottom_toBottomOf="parent" | ||||
|         app:layout_constraintEnd_toEndOf="parent" | ||||
|         app:layout_constraintTop_toTopOf="parent" | ||||
|         app:srcCompat="@drawable/ic_push_pin_outline_24dp" | ||||
|         tools:visibility="visible" /> | ||||
|  | ||||
| </androidx.constraintlayout.widget.ConstraintLayout> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user