mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-31 06:17:57 +01:00 
			
		
		
		
	Use Compose on Global/Migrate Search screen (#8631)
* Use Compose on Global/Migrate Search screen - Refactor to use Voyager and Compose - Use sealed class for state - Somethings are broken/missing due to screens using different navigation libraries * Review changes
This commit is contained in:
		| @@ -1,52 +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="wrap_content"> | ||||
|  | ||||
|     <androidx.recyclerview.widget.RecyclerView | ||||
|         android:id="@+id/recycler" | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:clipToPadding="false" | ||||
|         android:paddingTop="4dp" | ||||
|         android:paddingBottom="4dp" | ||||
|         tools:listitem="@layout/global_search_controller_card" /> | ||||
|  | ||||
|     <com.google.android.material.progressindicator.LinearProgressIndicator | ||||
|         android:id="@+id/progress_bar" | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="2dp" | ||||
|         android:max="100" | ||||
|         android:visibility="gone" | ||||
|         tools:progress="50" | ||||
|         tools:visibility="visible" /> | ||||
|  | ||||
|     <FrameLayout | ||||
|         android:id="@+id/progress" | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="match_parent" | ||||
|         android:visibility="gone"> | ||||
|  | ||||
|         <FrameLayout | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="match_parent" | ||||
|             android:alpha="0.75" | ||||
|             android:background="?attr/colorSurface" /> | ||||
|  | ||||
|         <com.google.android.material.progressindicator.CircularProgressIndicator | ||||
|             android:layout_width="wrap_content" | ||||
|             android:layout_height="match_parent" | ||||
|             android:layout_gravity="center" | ||||
|             android:indeterminate="true" /> | ||||
|  | ||||
|     </FrameLayout> | ||||
|  | ||||
|     <eu.kanade.tachiyomi.widget.EmptyView | ||||
|         android:id="@+id/empty_view" | ||||
|         android:layout_width="wrap_content" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:layout_gravity="center" | ||||
|         android:visibility="gone" /> | ||||
|  | ||||
| </FrameLayout> | ||||
| @@ -1,86 +0,0 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <LinearLayout 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:orientation="vertical"> | ||||
|  | ||||
|     <androidx.constraintlayout.widget.ConstraintLayout | ||||
|         android:id="@+id/title_wrapper" | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:background="?attr/selectableItemBackground"> | ||||
|  | ||||
|         <TextView | ||||
|             android:id="@+id/title" | ||||
|             android:layout_width="0dp" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_marginStart="16dp" | ||||
|             android:textAppearance="?attr/textAppearanceBodyMedium" | ||||
|             app:layout_constraintBottom_toTopOf="@+id/subtitle" | ||||
|             app:layout_constraintEnd_toStartOf="@+id/title_more_icon" | ||||
|             app:layout_constraintStart_toStartOf="parent" | ||||
|             app:layout_constraintTop_toTopOf="parent" | ||||
|             app:layout_constraintVertical_chainStyle="packed" | ||||
|             tools:text="Title" /> | ||||
|  | ||||
|         <TextView | ||||
|             android:id="@+id/subtitle" | ||||
|             android:layout_width="0dp" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_marginStart="16dp" | ||||
|             android:maxLines="1" | ||||
|             android:textAppearance="?attr/textAppearanceBodyMedium" | ||||
|             android:textSize="12sp" | ||||
|             android:visibility="gone" | ||||
|             android:textColor="?android:attr/textColorSecondary" | ||||
|             app:layout_constraintBottom_toBottomOf="parent" | ||||
|             app:layout_constraintEnd_toStartOf="@+id/title_more_icon" | ||||
|             app:layout_constraintStart_toStartOf="parent" | ||||
|             app:layout_constraintTop_toBottomOf="@+id/title" | ||||
|             tools:text="English" | ||||
|             tools:visibility="visible" /> | ||||
|  | ||||
|         <ImageView | ||||
|             android:id="@+id/title_more_icon" | ||||
|             android:layout_width="wrap_content" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:contentDescription="@string/all" | ||||
|             android:padding="16dp" | ||||
|             app:layout_constraintBottom_toBottomOf="parent" | ||||
|             app:layout_constraintEnd_toEndOf="parent" | ||||
|             app:layout_constraintTop_toTopOf="parent" | ||||
|             app:srcCompat="@drawable/ic_arrow_forward_24dp" | ||||
|             app:tint="?android:attr/textColorPrimary" /> | ||||
|  | ||||
|     </androidx.constraintlayout.widget.ConstraintLayout> | ||||
|  | ||||
|     <TextView | ||||
|         android:id="@+id/no_results_found" | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:paddingStart="16dp" | ||||
|         android:paddingEnd="16dp" | ||||
|         android:paddingBottom="16dp" | ||||
|         android:text="@string/no_results_found" | ||||
|         android:visibility="gone" /> | ||||
|  | ||||
|     <com.google.android.material.progressindicator.CircularProgressIndicator | ||||
|         android:id="@+id/progress" | ||||
|         style="@style/Widget.Tachiyomi.CircularProgressIndicator.Small" | ||||
|         android:layout_width="wrap_content" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:layout_gravity="center" | ||||
|         android:indeterminate="true" /> | ||||
|  | ||||
|     <androidx.recyclerview.widget.RecyclerView | ||||
|         android:id="@+id/recycler" | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:paddingStart="12dp" | ||||
|         android:paddingEnd="12dp" | ||||
|         android:clipToPadding="false" | ||||
|         tools:listitem="@layout/global_search_controller_card_item" /> | ||||
|  | ||||
| </LinearLayout> | ||||
| @@ -1,84 +0,0 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <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="wrap_content" | ||||
|     android:layout_height="wrap_content" | ||||
|     android:layout_marginVertical="4dp" | ||||
|     android:background="@drawable/library_item_selector" | ||||
|     android:padding="4dp"> | ||||
|  | ||||
|     <FrameLayout | ||||
|         android:id="@+id/card" | ||||
|         android:layout_width="112dp" | ||||
|         android:layout_height="144dp" | ||||
|         android:background="@drawable/rounded_rectangle" | ||||
|         app:layout_constraintDimensionRatio="h,5:7" | ||||
|         app:layout_constraintEnd_toEndOf="parent" | ||||
|         app:layout_constraintStart_toStartOf="parent" | ||||
|         app:layout_constraintTop_toTopOf="parent"> | ||||
|  | ||||
|         <com.google.android.material.progressindicator.CircularProgressIndicator | ||||
|             android:id="@+id/progress" | ||||
|             style="@style/Widget.Tachiyomi.CircularProgressIndicator.Small" | ||||
|             android:layout_width="wrap_content" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_gravity="center" | ||||
|             android:indeterminate="true" | ||||
|             android:visibility="gone" /> | ||||
|  | ||||
|         <ImageView | ||||
|             android:id="@+id/cover" | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="match_parent" | ||||
|             android:background="?attr/colorSurface" | ||||
|             android:scaleType="centerCrop" | ||||
|             tools:ignore="ContentDescription" | ||||
|             tools:src="@mipmap/ic_launcher" /> | ||||
|  | ||||
|         <LinearLayout | ||||
|             android:id="@+id/badges" | ||||
|             android:layout_width="wrap_content" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_marginStart="4dp" | ||||
|             android:layout_marginTop="4dp" | ||||
|             android:background="@drawable/rounded_rectangle"> | ||||
|  | ||||
|             <TextView | ||||
|                 android:id="@+id/favorite_text" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:background="?attr/colorSecondary" | ||||
|                 android:maxLines="1" | ||||
|                 android:paddingStart="3dp" | ||||
|                 android:paddingTop="1dp" | ||||
|                 android:paddingEnd="3dp" | ||||
|                 android:paddingBottom="1dp" | ||||
|                 android:fontFamily="sans-serif-condensed" | ||||
|                 android:text="@string/in_library" | ||||
|                 android:textAppearance="?attr/textAppearanceBodySmall" | ||||
|                 android:textColor="?attr/colorOnSecondary" | ||||
|                 android:visibility="gone" | ||||
|                 tools:visibility="visible" /> | ||||
|  | ||||
|         </LinearLayout> | ||||
|  | ||||
|     </FrameLayout> | ||||
|  | ||||
|     <TextView | ||||
|         android:id="@+id/title" | ||||
|         android:layout_width="0dp" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:ellipsize="end" | ||||
|         android:maxLines="2" | ||||
|         android:padding="4dp" | ||||
|         android:textAppearance="?attr/textAppearanceTitleSmall" | ||||
|         android:textSize="12sp" | ||||
|         app:layout_constraintEnd_toEndOf="@+id/card" | ||||
|         app:layout_constraintStart_toStartOf="@+id/card" | ||||
|         app:layout_constraintTop_toBottomOf="@+id/card" | ||||
|         tools:text="Sample name" /> | ||||
|  | ||||
| </androidx.constraintlayout.widget.ConstraintLayout> | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user