mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-31 06:17:57 +01:00 
			
		
		
		
	Tracking sheet and search adjustments (#5427)
* Tracking sheet and search visual adjustments * Remove track item divider * Add start margin to "add tracking" button * Fix track search dialog crash when no item chosen * Show "remove" action only when track item is previously set * Remove placeholder for total chapters * Cleanups * Add track search error/empty result message * Make track search dialog fullscreen * Use AutofitRecyclerView for track search dialog * Fix text input overlapping * Run track search from IME action instead * Remove deprecated method * Reformat * Set track search error message on the placeholder * Use payload to notify track search item change * Fix track search action icon tint color
This commit is contained in:
		
							
								
								
									
										6
									
								
								app/src/main/res/anim/fade_in_short.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								app/src/main/res/anim/fade_in_short.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <alpha xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|     android:duration="100" | ||||
|     android:fromAlpha="0.0" | ||||
|     android:interpolator="@android:interpolator/linear" | ||||
|     android:toAlpha="1.0" /> | ||||
							
								
								
									
										6
									
								
								app/src/main/res/anim/fade_out_short.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								app/src/main/res/anim/fade_out_short.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <alpha xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|     android:duration="100" | ||||
|     android:fromAlpha="1.0" | ||||
|     android:interpolator="@android:interpolator/linear" | ||||
|     android:toAlpha="0.0" /> | ||||
| @@ -5,6 +5,5 @@ | ||||
|     android:layout_width="match_parent" | ||||
|     android:layout_height="match_parent" | ||||
|     android:clipToPadding="false" | ||||
|     android:paddingTop="8dp" | ||||
|     android:paddingBottom="8dp" | ||||
|     android:paddingVertical="8dp" | ||||
|     tools:listitem="@layout/track_item" /> | ||||
|   | ||||
| @@ -1,192 +1,194 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" | ||||
| <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:id="@+id/track" | ||||
|     style="@style/Widget.Tachiyomi.CardView.Item" | ||||
|     android:padding="0dp"> | ||||
|     android:layout_width="match_parent" | ||||
|     android:layout_height="wrap_content" | ||||
|     android:clipToPadding="false" | ||||
|     android:orientation="vertical" | ||||
|     android:paddingHorizontal="16dp" | ||||
|     android:paddingVertical="8dp"> | ||||
|  | ||||
|     <LinearLayout | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:orientation="vertical"> | ||||
|         android:gravity="center_vertical" | ||||
|         android:orientation="horizontal"> | ||||
|  | ||||
|         <com.google.android.material.card.MaterialCardView | ||||
|             android:id="@+id/logo_container" | ||||
|             android:layout_width="48dp" | ||||
|             android:layout_height="48dp" | ||||
|             android:clickable="true" | ||||
|             android:focusable="true" | ||||
|             android:foreground="?attr/selectableItemBackground" | ||||
|             app:cardBackgroundColor="#2E51A2" | ||||
|             app:cardElevation="0dp" | ||||
|             app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.MaterialCardView.Tracker"> | ||||
|  | ||||
|             <ImageView | ||||
|                 android:id="@+id/track_logo" | ||||
|                 android:layout_width="match_parent" | ||||
|                 android:layout_height="match_parent" | ||||
|                 android:importantForAccessibility="no" | ||||
|                 android:padding="4dp" | ||||
|                 tools:src="@drawable/ic_tracker_mal" /> | ||||
|  | ||||
|         </com.google.android.material.card.MaterialCardView> | ||||
|  | ||||
|         <LinearLayout | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:orientation="horizontal"> | ||||
|  | ||||
|             <LinearLayout | ||||
|                 android:id="@+id/logo_container" | ||||
|                 android:layout_width="48dp" | ||||
|                 android:layout_height="match_parent" | ||||
|                 android:clickable="true" | ||||
|                 android:focusable="true" | ||||
|                 android:gravity="center" | ||||
|                 android:orientation="horizontal" | ||||
|                 android:padding="4dp" | ||||
|                 tools:background="#2E51A2"> | ||||
|  | ||||
|                 <ImageView | ||||
|                     android:id="@+id/track_logo" | ||||
|                     android:layout_width="match_parent" | ||||
|                     android:layout_height="match_parent" | ||||
|                     tools:src="@drawable/ic_tracker_mal" /> | ||||
|  | ||||
|             </LinearLayout> | ||||
|  | ||||
|             <LinearLayout | ||||
|             <Button | ||||
|                 android:id="@+id/track_set" | ||||
|                 style="?attr/borderlessButtonStyle" | ||||
|                 android:layout_width="match_parent" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:orientation="horizontal" | ||||
|                 app:layout_constraintEnd_toEndOf="parent" | ||||
|                 app:layout_constraintStart_toStartOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent"> | ||||
|  | ||||
|                 <Button | ||||
|                     android:id="@+id/track_set" | ||||
|                     style="?attr/borderlessButtonStyle" | ||||
|                     android:layout_width="match_parent" | ||||
|                     android:layout_height="wrap_content" | ||||
|                     android:layout_gravity="center" | ||||
|                     android:text="@string/add_tracking" | ||||
|                     android:visibility="gone" /> | ||||
|  | ||||
|                 <TextView | ||||
|                     android:id="@+id/track_title" | ||||
|                     style="@style/TextAppearance.Regular.Body1.Secondary" | ||||
|                     android:layout_width="match_parent" | ||||
|                     android:layout_height="wrap_content" | ||||
|                     android:background="@drawable/list_item_selector" | ||||
|                     android:ellipsize="end" | ||||
|                     android:maxLines="1" | ||||
|                     android:padding="16dp" | ||||
|                     tools:text="Title" /> | ||||
|  | ||||
|             </LinearLayout> | ||||
|  | ||||
|         </LinearLayout> | ||||
|  | ||||
|         <View | ||||
|             android:id="@+id/top_divider" | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="1dp" | ||||
|             android:background="?android:divider" /> | ||||
|  | ||||
|         <LinearLayout | ||||
|             android:id="@+id/middle_row" | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content"> | ||||
|                 android:layout_gravity="center" | ||||
|                 android:layout_marginStart="16dp" | ||||
|                 android:text="@string/add_tracking" | ||||
|                 android:visibility="gone" /> | ||||
|  | ||||
|             <TextView | ||||
|                 android:id="@+id/track_status" | ||||
|                 style="@style/TextAppearance.Regular.Body1.Secondary" | ||||
|                 android:layout_weight="1" | ||||
|                 android:layout_width="0dp" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:background="@drawable/list_item_selector" | ||||
|                 android:id="@+id/track_title" | ||||
|                 android:layout_width="match_parent" | ||||
|                 android:layout_height="48dp" | ||||
|                 android:ellipsize="end" | ||||
|                 android:gravity="center" | ||||
|                 android:foreground="?attr/selectableItemBackgroundBorderless" | ||||
|                 android:gravity="center_vertical" | ||||
|                 android:maxLines="1" | ||||
|                 android:padding="16dp" | ||||
|                 tools:text="Reading" /> | ||||
|  | ||||
|             <View | ||||
|                 android:id="@+id/vert_divider_1" | ||||
|                 android:layout_width="1dp" | ||||
|                 android:layout_height="match_parent" | ||||
|                 android:layout_marginTop="8dp" | ||||
|                 android:layout_marginBottom="8dp" | ||||
|                 android:background="?android:divider" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|             <TextView | ||||
|                 android:id="@+id/track_chapters" | ||||
|                 style="@style/TextAppearance.Regular.Body1.Secondary" | ||||
|                 android:layout_weight="1" | ||||
|                 android:layout_width="0dp" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:background="@drawable/list_item_selector" | ||||
|                 android:ellipsize="end" | ||||
|                 android:gravity="center" | ||||
|                 android:maxLines="1" | ||||
|                 android:padding="16dp" | ||||
|                 tools:text="12/24" /> | ||||
|  | ||||
|             <View | ||||
|                 android:id="@+id/vert_divider_2" | ||||
|                 android:layout_width="1dp" | ||||
|                 android:layout_height="match_parent" | ||||
|                 android:layout_marginTop="8dp" | ||||
|                 android:layout_marginBottom="8dp" | ||||
|                 android:background="?android:divider"/> | ||||
|  | ||||
|             <TextView | ||||
|                 android:id="@+id/track_score" | ||||
|                 style="@style/TextAppearance.Regular.Body1.Secondary" | ||||
|                 android:layout_weight="1" | ||||
|                 android:layout_width="0dp" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:background="@drawable/list_item_selector" | ||||
|                 android:ellipsize="end" | ||||
|                 android:gravity="center" | ||||
|                 android:maxLines="1" | ||||
|                 android:padding="16dp" | ||||
|                 tools:text="10" /> | ||||
|  | ||||
|         </LinearLayout> | ||||
|  | ||||
|         <View | ||||
|             android:id="@+id/bottom_divider" | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="1dp" | ||||
|             android:background="?android:divider" /> | ||||
|  | ||||
|         <LinearLayout | ||||
|             android:id="@+id/bottom_row" | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content"> | ||||
|  | ||||
|             <TextView | ||||
|                 android:id="@+id/track_start_date" | ||||
|                 style="@style/TextAppearance.Regular.Body1.Secondary" | ||||
|                 android:layout_weight="1" | ||||
|                 android:layout_width="0dp" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:background="@drawable/list_item_selector" | ||||
|                 android:ellipsize="end" | ||||
|                 android:gravity="center" | ||||
|                 android:maxLines="1" | ||||
|                 android:padding="16dp" | ||||
|                 tools:text="4/16/2020" /> | ||||
|  | ||||
|             <View | ||||
|                 android:id="@+id/vert_divider_3" | ||||
|                 android:layout_width="1dp" | ||||
|                 android:layout_height="match_parent" | ||||
|                 android:layout_marginTop="8dp" | ||||
|                 android:layout_marginBottom="8dp" | ||||
|                 android:background="?android:divider" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" /> | ||||
|  | ||||
|             <TextView | ||||
|                 android:id="@+id/track_finish_date" | ||||
|                 style="@style/TextAppearance.Regular.Body1.Secondary" | ||||
|                 android:layout_weight="1" | ||||
|                 android:layout_width="0dp" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:background="@drawable/list_item_selector" | ||||
|                 android:ellipsize="end" | ||||
|                 android:gravity="center" | ||||
|                 android:maxLines="1" | ||||
|                 android:padding="16dp" | ||||
|                 app:layout_constraintEnd_toEndOf="parent" | ||||
|                 app:layout_constraintStart_toEndOf="@+id/vert_divider_3" | ||||
|                 app:layout_constraintTop_toBottomOf="@+id/bottom_divider" | ||||
|                 tools:text="4/16/2020" /> | ||||
|                 android:paddingHorizontal="16dp" | ||||
|                 android:textAppearance="?attr/textAppearanceSubtitle1" | ||||
|                 tools:text="Title" /> | ||||
|  | ||||
|         </LinearLayout> | ||||
|  | ||||
|     </LinearLayout> | ||||
|  | ||||
| </androidx.cardview.widget.CardView> | ||||
|     <com.google.android.material.card.MaterialCardView | ||||
|         android:id="@+id/card" | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:layout_marginTop="8dp" | ||||
|         app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.MaterialCardView.Tracker"> | ||||
|  | ||||
|         <LinearLayout | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:orientation="vertical" | ||||
|             android:paddingHorizontal="12dp" | ||||
|             android:paddingVertical="8dp"> | ||||
|  | ||||
|             <LinearLayout | ||||
|                 android:id="@+id/middle_row" | ||||
|                 android:layout_width="match_parent" | ||||
|                 android:layout_height="wrap_content"> | ||||
|  | ||||
|                 <TextView | ||||
|                     android:id="@+id/track_status" | ||||
|                     android:layout_width="0dp" | ||||
|                     android:layout_height="wrap_content" | ||||
|                     android:layout_weight="1" | ||||
|                     android:ellipsize="end" | ||||
|                     android:foreground="?attr/selectableItemBackgroundBorderless" | ||||
|                     android:gravity="center" | ||||
|                     android:maxLines="1" | ||||
|                     android:padding="12dp" | ||||
|                     android:textAppearance="?attr/textAppearanceBody2" | ||||
|                     tools:text="Reading" /> | ||||
|  | ||||
|             <View | ||||
|                 android:id="@+id/vert_divider_1" | ||||
|                 android:layout_width="1dp" | ||||
|                 android:layout_height="match_parent" | ||||
|                 android:background="?android:divider" /> | ||||
|  | ||||
|                 <TextView | ||||
|                     android:id="@+id/track_chapters" | ||||
|                     android:layout_width="0dp" | ||||
|                     android:layout_height="wrap_content" | ||||
|                     android:layout_weight="1" | ||||
|                     android:ellipsize="end" | ||||
|                     android:foreground="?attr/selectableItemBackgroundBorderless" | ||||
|                     android:gravity="center" | ||||
|                     android:maxLines="1" | ||||
|                     android:padding="12dp" | ||||
|                     android:textAppearance="?attr/textAppearanceBody2" | ||||
|                     tools:text="12/24" /> | ||||
|  | ||||
|             <View | ||||
|                 android:id="@+id/vert_divider_2" | ||||
|                 android:layout_width="1dp" | ||||
|                 android:layout_height="match_parent" | ||||
|                 android:background="?android:divider"/> | ||||
|  | ||||
|                 <TextView | ||||
|                     android:id="@+id/track_score" | ||||
|                     android:layout_width="0dp" | ||||
|                     android:layout_height="wrap_content" | ||||
|                     android:layout_weight="1" | ||||
|                     android:ellipsize="end" | ||||
|                     android:foreground="?attr/selectableItemBackgroundBorderless" | ||||
|                     android:gravity="center" | ||||
|                     android:maxLines="1" | ||||
|                     android:padding="12dp" | ||||
|                     android:textAppearance="?attr/textAppearanceBody2" | ||||
|                     tools:text="10" /> | ||||
|  | ||||
|             </LinearLayout> | ||||
|  | ||||
|             <View | ||||
|                 android:id="@+id/bottom_divider" | ||||
|                 android:layout_width="match_parent" | ||||
|                 android:layout_height="1dp" | ||||
|  | ||||
|                 android:background="?android:divider" /> | ||||
|  | ||||
|             <LinearLayout | ||||
|                 android:id="@+id/bottom_row" | ||||
|                 android:layout_width="match_parent" | ||||
|                 android:layout_height="wrap_content"> | ||||
|  | ||||
|                 <TextView | ||||
|                     android:id="@+id/track_start_date" | ||||
|                     android:layout_width="0dp" | ||||
|                     android:layout_height="wrap_content" | ||||
|                     android:layout_weight="1" | ||||
|                     android:ellipsize="end" | ||||
|                     android:foreground="?attr/selectableItemBackgroundBorderless" | ||||
|                     android:gravity="center" | ||||
|                     android:maxLines="1" | ||||
|                     android:padding="12dp" | ||||
|                     android:textAppearance="?attr/textAppearanceBody2" | ||||
|                     tools:text="4/16/2020" /> | ||||
|  | ||||
|             <View | ||||
|                 android:id="@+id/vert_divider_3" | ||||
|                 android:layout_width="1dp" | ||||
|                 android:layout_height="match_parent" | ||||
|                 android:background="?android:divider" /> | ||||
|  | ||||
|                 <TextView | ||||
|                     android:id="@+id/track_finish_date" | ||||
|                     android:layout_width="0dp" | ||||
|                     android:layout_height="wrap_content" | ||||
|                     android:layout_weight="1" | ||||
|                     android:ellipsize="end" | ||||
|                     android:foreground="?attr/selectableItemBackgroundBorderless" | ||||
|                     android:gravity="center" | ||||
|                     android:maxLines="1" | ||||
|                     android:padding="12dp" | ||||
|                     android:textAppearance="?attr/textAppearanceBody2" | ||||
|                     tools:text="4/16/2020" /> | ||||
|  | ||||
|             </LinearLayout> | ||||
|  | ||||
|  | ||||
|         </LinearLayout> | ||||
|  | ||||
|     </com.google.android.material.card.MaterialCardView> | ||||
|  | ||||
| </LinearLayout> | ||||
|   | ||||
| @@ -1,62 +1,90 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||||
| <androidx.coordinatorlayout.widget.CoordinatorLayout 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:id="@+id/container" | ||||
|     android:layout_width="match_parent" | ||||
|     android:layout_height="match_parent" | ||||
|     android:orientation="vertical"> | ||||
|     android:layout_height="match_parent"> | ||||
|  | ||||
|     <com.google.android.material.textfield.TextInputLayout | ||||
|     <com.google.android.material.appbar.AppBarLayout | ||||
|         android:id="@+id/appbar" | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:layout_marginStart="16dp" | ||||
|         android:layout_marginEnd="16dp" | ||||
|         app:boxBackgroundMode="filled" | ||||
|         app:endIconMode="clear_text" | ||||
|         app:hintEnabled="false"> | ||||
|         android:layout_height="wrap_content"> | ||||
|  | ||||
|         <com.google.android.material.textfield.TextInputEditText | ||||
|             android:id="@+id/track_search" | ||||
|         <androidx.appcompat.widget.Toolbar | ||||
|             android:id="@+id/toolbar" | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="?attr/actionBarSize" | ||||
|             android:theme="?attr/actionBarTheme" | ||||
|             app:contentInsetStartWithNavigation="0dp" | ||||
|             app:menu="@menu/track_search" | ||||
|             app:navigationIcon="@drawable/ic_close_24dp" | ||||
|             app:title="@string/add_tracking" /> | ||||
|  | ||||
|     </com.google.android.material.appbar.AppBarLayout> | ||||
|  | ||||
|     <LinearLayout | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="match_parent" | ||||
|         android:orientation="vertical" | ||||
|         app:layout_behavior="@string/appbar_scrolling_view_behavior"> | ||||
|  | ||||
|         <com.google.android.material.textfield.TextInputLayout | ||||
|             android:id="@+id/title_input" | ||||
|             style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense" | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:hint="@string/title" | ||||
|             android:inputType="text" /> | ||||
|             android:layout_marginHorizontal="12dp" | ||||
|             android:layout_marginTop="8dp" | ||||
|             android:hint="@string/title"> | ||||
|  | ||||
|     </com.google.android.material.textfield.TextInputLayout> | ||||
|             <com.google.android.material.textfield.TextInputEditText | ||||
|                 android:id="@+id/title_input_edit_text" | ||||
|                 android:layout_width="match_parent" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:imeOptions="actionSearch" | ||||
|                 android:inputType="text" | ||||
|                 android:maxLines="1" /> | ||||
|  | ||||
|     <FrameLayout | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="0dp" | ||||
|         android:layout_weight="1"> | ||||
|         </com.google.android.material.textfield.TextInputLayout> | ||||
|  | ||||
|         <com.google.android.material.progressindicator.CircularProgressIndicator | ||||
|             android:id="@+id/progress" | ||||
|             android:layout_width="wrap_content" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_gravity="center" | ||||
|             android:layout_marginTop="32dp" | ||||
|             android:layout_marginBottom="32dp" | ||||
|             android:indeterminate="true" | ||||
|             android:visibility="invisible" | ||||
|             tools:visibility="visible" /> | ||||
|  | ||||
|         <ListView | ||||
|             android:id="@+id/track_search_list" | ||||
|             style="@style/Widget.Tachiyomi.CardView" | ||||
|         <FrameLayout | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="match_parent" | ||||
|             android:choiceMode="singleChoice" | ||||
|             android:clipToPadding="false" | ||||
|             android:divider="@null" | ||||
|             android:dividerHeight="10dp" | ||||
|             android:footerDividersEnabled="true" | ||||
|             android:headerDividersEnabled="true" | ||||
|             android:listSelector="@drawable/list_item_selector" | ||||
|             android:scrollbars="none" | ||||
|             android:visibility="invisible" | ||||
|             tools:listitem="@layout/track_search_item" | ||||
|             tools:visibility="visible" /> | ||||
|             android:layout_height="0dp" | ||||
|             android:layout_weight="1"> | ||||
|  | ||||
|     </FrameLayout> | ||||
|             <com.google.android.material.progressindicator.CircularProgressIndicator | ||||
|                 android:id="@+id/progress" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:layout_gravity="center" | ||||
|                 android:indeterminate="true" | ||||
|                 android:visibility="gone" /> | ||||
|  | ||||
| </LinearLayout> | ||||
|             <TextView | ||||
|                 android:id="@+id/message" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:layout_gravity="center" | ||||
|                 android:textAppearance="?attr/textAppearanceBody2" | ||||
|                 android:visibility="gone" | ||||
|                 tools:text="@string/no_results_found" /> | ||||
|  | ||||
|             <eu.kanade.tachiyomi.widget.AutofitRecyclerView | ||||
|                 android:id="@+id/track_search_recyclerview" | ||||
|                 android:layout_width="match_parent" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:layout_marginTop="8dp" | ||||
|                 android:clipToPadding="false" | ||||
|                 android:columnWidth="330dp" | ||||
|                 android:paddingHorizontal="8dp" | ||||
|                 android:paddingBottom="8dp" | ||||
|                 android:visibility="gone" | ||||
|                 tools:listitem="@layout/track_search_item" | ||||
|                 tools:visibility="visible" /> | ||||
|  | ||||
|         </FrameLayout> | ||||
|  | ||||
|     </LinearLayout> | ||||
|  | ||||
| </androidx.coordinatorlayout.widget.CoordinatorLayout> | ||||
|   | ||||
| @@ -1,65 +1,69 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" | ||||
| <com.google.android.material.card.MaterialCardView 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" | ||||
|     style="@style/Widget.Tachiyomi.CardView.Item" | ||||
|     android:layout_margin="0dp" | ||||
|     android:padding="0dp"> | ||||
|     android:id="@+id/container" | ||||
|     android:layout_width="match_parent" | ||||
|     android:layout_height="wrap_content" | ||||
|     android:layout_margin="4dp" | ||||
|     android:checkable="true" | ||||
|     android:clickable="true" | ||||
|     android:focusable="true" | ||||
|     app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.MaterialCardView.Tracker"> | ||||
|  | ||||
|     <androidx.constraintlayout.widget.ConstraintLayout | ||||
|         android:id="@+id/linearLayout" | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="216dp" | ||||
|         android:background="@drawable/list_item_selector" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:orientation="horizontal"> | ||||
|  | ||||
|         <ImageView | ||||
|             android:id="@+id/track_search_cover" | ||||
|             android:layout_width="135dp" | ||||
|             android:layout_height="match_parent" | ||||
|             android:layout_width="130dp" | ||||
|             android:layout_height="180dp" | ||||
|             android:contentDescription="@string/description_cover" | ||||
|             android:scaleType="centerCrop" | ||||
|             app:layout_constraintBottom_toBottomOf="parent" | ||||
|             app:layout_constraintStart_toStartOf="parent" | ||||
|             app:layout_constraintTop_toTopOf="parent" | ||||
|             app:layout_constraintVertical_bias="0.0" | ||||
|             tools:src="@mipmap/ic_launcher" /> | ||||
|  | ||||
|         <TextView | ||||
|             android:id="@+id/track_search_title" | ||||
|             android:layout_width="0dp" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_marginStart="16dp" | ||||
|             android:layout_marginStart="8dp" | ||||
|             android:layout_marginTop="8dp" | ||||
|             android:layout_marginEnd="8dp" | ||||
|             android:maxLines="3" | ||||
|             android:textAppearance="@style/TextAppearance.Regular.Body1.Bold" | ||||
|             android:textSize="16sp" | ||||
|             android:layout_marginEnd="36dp" | ||||
|             android:ellipsize="end" | ||||
|             android:maxLines="2" | ||||
|             android:textAppearance="?attr/textAppearanceHeadline6" | ||||
|             android:textSize="17sp" | ||||
|             app:layout_constraintEnd_toEndOf="parent" | ||||
|             app:layout_constraintStart_toEndOf="@id/track_search_cover" | ||||
|             app:layout_constraintTop_toTopOf="parent" | ||||
|             tools:text="One Piece" /> | ||||
|             tools:text="@string/app_name" /> | ||||
|  | ||||
|         <TextView | ||||
|             android:id="@+id/track_search_type" | ||||
|             android:layout_width="wrap_content" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_marginStart="16dp" | ||||
|             android:maxLines="1" | ||||
|             android:text="@string/track_type" | ||||
|             android:textAppearance="@style/TextAppearance.Regular.Body1.Bold" | ||||
|             android:textSize="12sp" | ||||
|             app:layout_constraintStart_toEndOf="@id/track_search_cover" | ||||
|             android:textAppearance="?attr/textAppearanceSubtitle2" | ||||
|             app:layout_constraintStart_toStartOf="@+id/track_search_title" | ||||
|             app:layout_constraintTop_toBottomOf="@id/track_search_title" /> | ||||
|  | ||||
|         <TextView | ||||
|             android:id="@+id/track_search_type_result" | ||||
|             android:layout_width="wrap_content" | ||||
|             android:layout_width="0dp" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_marginStart="8dp" | ||||
|             android:layout_marginStart="4dp" | ||||
|             android:layout_marginEnd="12dp" | ||||
|             android:maxLines="1" | ||||
|             android:textAppearance="@style/TextAppearance.Regular.Body1.Secondary" | ||||
|             android:textSize="12sp" | ||||
|             android:textAppearance="?attr/textAppearanceBody2" | ||||
|             android:textColor="?android:attr/textColorSecondary" | ||||
|             app:layout_constraintEnd_toEndOf="parent" | ||||
|             app:layout_constraintStart_toEndOf="@id/track_search_type" | ||||
|             app:layout_constraintTop_toBottomOf="@id/track_search_title" | ||||
|             tools:text="Manga" /> | ||||
| @@ -68,22 +72,23 @@ | ||||
|             android:id="@+id/track_search_start" | ||||
|             android:layout_width="wrap_content" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_marginStart="16dp" | ||||
|             android:maxLines="1" | ||||
|             android:text="@string/track_start_date" | ||||
|             android:textAppearance="@style/TextAppearance.Regular.Body1.Bold" | ||||
|             android:textSize="12sp" | ||||
|             app:layout_constraintStart_toEndOf="@id/track_search_cover" | ||||
|             android:textAppearance="?attr/textAppearanceSubtitle2" | ||||
|             app:layout_constraintStart_toStartOf="@+id/track_search_type" | ||||
|             app:layout_constraintTop_toBottomOf="@id/track_search_type" /> | ||||
|  | ||||
|         <TextView | ||||
|             android:id="@+id/track_search_start_result" | ||||
|             android:layout_width="wrap_content" | ||||
|             android:layout_width="0dp" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_marginStart="8dp" | ||||
|             android:layout_marginStart="4dp" | ||||
|             android:layout_marginEnd="12dp" | ||||
|             android:ellipsize="end" | ||||
|             android:maxLines="1" | ||||
|             android:textAppearance="@style/TextAppearance.Regular.Body1.Secondary" | ||||
|             android:textSize="12sp" | ||||
|             android:textAppearance="?attr/textAppearanceBody2" | ||||
|             android:textColor="?android:attr/textColorSecondary" | ||||
|             app:layout_constraintEnd_toEndOf="parent" | ||||
|             app:layout_constraintStart_toEndOf="@id/track_search_start" | ||||
|             app:layout_constraintTop_toBottomOf="@id/track_search_type" | ||||
|             tools:text="2018-10-01" /> | ||||
| @@ -92,22 +97,24 @@ | ||||
|             android:id="@+id/track_search_status" | ||||
|             android:layout_width="wrap_content" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_marginStart="16dp" | ||||
|             android:ellipsize="end" | ||||
|             android:maxLines="1" | ||||
|             android:text="@string/track_status" | ||||
|             android:textAppearance="@style/TextAppearance.Regular.Body1.Bold" | ||||
|             android:textSize="12sp" | ||||
|             app:layout_constraintStart_toEndOf="@id/track_search_cover" | ||||
|             android:textAppearance="?attr/textAppearanceSubtitle2" | ||||
|             app:layout_constraintStart_toStartOf="@+id/track_search_start" | ||||
|             app:layout_constraintTop_toBottomOf="@id/track_search_start" /> | ||||
|  | ||||
|         <TextView | ||||
|             android:id="@+id/track_search_status_result" | ||||
|             android:layout_width="wrap_content" | ||||
|             android:layout_height="0dp" | ||||
|             android:layout_marginStart="8dp" | ||||
|             android:layout_width="0dp" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_marginStart="4dp" | ||||
|             android:layout_marginEnd="12dp" | ||||
|             android:ellipsize="end" | ||||
|             android:maxLines="1" | ||||
|             android:textAppearance="@style/TextAppearance.Regular.Body1.Secondary" | ||||
|             android:textSize="12sp" | ||||
|             android:textAppearance="?attr/textAppearanceBody2" | ||||
|             android:textColor="?android:attr/textColorSecondary" | ||||
|             app:layout_constraintEnd_toEndOf="parent" | ||||
|             app:layout_constraintStart_toEndOf="@id/track_search_status" | ||||
|             app:layout_constraintTop_toBottomOf="@id/track_search_start" | ||||
|             tools:text="Ongoing" /> | ||||
| @@ -116,22 +123,17 @@ | ||||
|             android:id="@+id/track_search_summary" | ||||
|             android:layout_width="0dp" | ||||
|             android:layout_height="0dp" | ||||
|             android:layout_marginStart="16dp" | ||||
|             android:layout_marginTop="8dp" | ||||
|             android:layout_marginEnd="16dp" | ||||
|             android:layout_marginEnd="12dp" | ||||
|             android:layout_marginBottom="8dp" | ||||
|             android:ellipsize="end" | ||||
|             android:maxLines="7" | ||||
|             android:textAppearance="@style/TextAppearance.Regular.Body1.Secondary" | ||||
|             android:textSize="12sp" | ||||
|             android:textAppearance="?attr/textAppearanceCaption" | ||||
|             android:textColor="?android:attr/textColorSecondary" | ||||
|             app:layout_constraintBottom_toBottomOf="parent" | ||||
|             app:layout_constraintEnd_toEndOf="parent" | ||||
|             app:layout_constraintHorizontal_bias="0.0" | ||||
|             app:layout_constraintStart_toEndOf="@id/track_search_cover" | ||||
|             app:layout_constraintStart_toStartOf="@+id/track_search_status" | ||||
|             app:layout_constraintTop_toBottomOf="@+id/track_search_status" | ||||
|             app:layout_constraintVertical_bias="0.333" | ||||
|             tools:text="This is the summary of the manga that fits This is the summary of the manga that fits This is the summary of the manga that fits This is the summary of the manga that fits This is the summary of the manga that fits This is the summary of the manga that fits This is the summary of the manga that fits " /> | ||||
|             tools:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas condimentum et turpis ut sollicitudin. Donec tellus dolor, rhoncus a mattis eget, tempor quis augue. Fusce eleifend dignissim turpis a molestie.  Praesent tincidunt, risus sed egestas fringilla, urna orci ultrices libero, id iaculis sem lorem placerat lacus." /> | ||||
|  | ||||
|     </androidx.constraintlayout.widget.ConstraintLayout> | ||||
|  | ||||
| </androidx.cardview.widget.CardView> | ||||
| </com.google.android.material.card.MaterialCardView> | ||||
|   | ||||
							
								
								
									
										20
									
								
								app/src/main/res/menu/track_search.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								app/src/main/res/menu/track_search.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | ||||
| <?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/remove" | ||||
|         android:icon="@drawable/ic_delete_24dp" | ||||
|         android:title="@string/action_remove" | ||||
|         android:visible="false" | ||||
|         app:iconTint="?attr/colorOnToolbar" | ||||
|         app:showAsAction="ifRoom" /> | ||||
|  | ||||
|     <item | ||||
|         android:id="@+id/done" | ||||
|         android:enabled="false" | ||||
|         android:icon="@drawable/ic_check_24dp" | ||||
|         android:title="@android:string/ok" | ||||
|         app:iconTint="?attr/colorOnToolbar" | ||||
|         app:showAsAction="ifRoom" /> | ||||
| </menu> | ||||
| @@ -605,8 +605,8 @@ | ||||
|     <string name="status">Status</string> | ||||
|     <string name="track_status">Status</string> | ||||
|     <string name="track_start_date">Started</string> | ||||
|     <string name="track_started_reading_date">Started reading date</string> | ||||
|     <string name="track_finished_reading_date">Finished reading date</string> | ||||
|     <string name="track_started_reading_date">Start date</string> | ||||
|     <string name="track_finished_reading_date">Finish date</string> | ||||
|     <string name="track_type">Type</string> | ||||
|     <string name="track_author">Author</string> | ||||
|     <string name="error_invalid_date_supplied">Invalid date supplied</string> | ||||
|   | ||||
| @@ -148,24 +148,6 @@ | ||||
|     <!--Widgets--> | ||||
|     <!--=======--> | ||||
|  | ||||
|     <style name="Widget.Tachiyomi.CardView" parent="CardView"> | ||||
|         <item name="android:layout_width">match_parent</item> | ||||
|         <item name="android:layout_height">wrap_content</item> | ||||
|         <item name="android:padding">16dp</item> | ||||
|         <item name="android:layout_marginTop">8dp</item> | ||||
|         <item name="android:layout_marginBottom">8dp</item> | ||||
|         <item name="android:layout_marginStart">8dp</item> | ||||
|         <item name="android:layout_marginEnd">8dp</item> | ||||
|         <item name="cardBackgroundColor">?attr/colorSurface</item> | ||||
|         <item name="cardCornerRadius">@dimen/card_radius</item> | ||||
|         <item name="cardElevation">2dp</item> | ||||
|     </style> | ||||
|  | ||||
|     <style name="Widget.Tachiyomi.CardView.Item"> | ||||
|         <item name="android:layout_marginTop">@dimen/space_between_cards</item> | ||||
|         <item name="android:layout_marginBottom">@dimen/space_between_cards</item> | ||||
|     </style> | ||||
|  | ||||
|     <style name="Widget.Tachiyomi.GridView" parent="android:Widget"> | ||||
|         <item name="android:smoothScrollbar">true</item> | ||||
|         <item name="android:numColumns">auto_fit</item> | ||||
| @@ -307,4 +289,23 @@ | ||||
|         <item name="md_button_selector">@drawable/md_btn_selector_dark</item> | ||||
|     </style> | ||||
|  | ||||
|     <!--================--> | ||||
|     <!--Shape Appearance--> | ||||
|     <!--================--> | ||||
|     <style name="ShapeAppearanceOverlay.MaterialCardView.Tracker" parent=""> | ||||
|         <item name="cornerFamily">rounded</item> | ||||
|         <item name="cornerSize">8dp</item> | ||||
|     </style> | ||||
|  | ||||
|     <style name="ThemeOverlay.Tachiyomi.Dialog.Fullscreen" parent="ThemeOverlay.MaterialComponents"> | ||||
|         <item name="android:windowIsFloating">false</item> | ||||
|         <item name="android:windowBackground">?android:attr/colorBackground</item> | ||||
|         <item name="android:windowAnimationStyle">@style/Animation.Tachiyomi.Dialog</item> | ||||
|     </style> | ||||
|  | ||||
|     <style name="Animation.Tachiyomi.Dialog" parent="Animation.AppCompat.Dialog"> | ||||
|         <item name="android:windowEnterAnimation">@anim/fade_in_short</item> | ||||
|         <item name="android:windowExitAnimation">@anim/fade_out_short</item> | ||||
|     </style> | ||||
|  | ||||
| </resources> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user