feat: searching

This commit is contained in:
rebel onion
2025-01-03 09:01:09 -06:00
parent 38d68a7976
commit 7b8af6ea8a
31 changed files with 2109 additions and 702 deletions

View File

@@ -1,111 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView 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="match_parent">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorSurface">
<TextView
android:id="@+id/studioTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:ellipsize="marquee"
android:fontFamily="@font/poppins_bold"
android:singleLine="true"
android:textAlignment="center"
android:textColor="@color/bg_opp"
android:textSize="20sp"
tools:text="@string/name" />
</com.google.android.material.appbar.AppBarLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="64dp"
android:orientation="vertical">
<TextView
android:id="@+id/charactersText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="32dp"
android:fontFamily="@font/poppins_bold"
android:padding="8dp"
android:text="@string/characters"
android:textSize="18sp"
android:visibility="gone" />
<ani.dantotsu.FadingEdgeRecyclerView
android:id="@+id/charactersRecycler"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:nestedScrollingEnabled="true"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:requiresFadingEdge="horizontal"
android:visibility="gone"
tools:itemCount="4"
tools:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
tools:listitem="@layout/item_media_compact"
tools:orientation="horizontal"
tools:visibility="visible" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/studioRecycler"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:paddingTop="16dp"
android:visibility="gone"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
tools:itemCount="2"
tools:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_media_compact"
tools:orientation="vertical"
tools:visibility="visible" />
</LinearLayout>
<ProgressBar
android:id="@+id/studioProgressBar"
style="?android:attr/progressBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="32dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:visibility="gone" />
<androidx.cardview.widget.CardView
android:id="@+id/studioClose"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_gravity="end"
android:layout_margin="16dp"
android:translationZ="2dp"
app:cardBackgroundColor="@color/nav_bg"
app:cardCornerRadius="16dp">
<androidx.constraintlayout.utils.widget.ImageFilterView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center"
android:src="@drawable/ic_round_close_24"
tools:ignore="ContentDescription" />
</androidx.cardview.widget.CardView>
</FrameLayout>
</androidx.core.widget.NestedScrollView>

View File

@@ -104,20 +104,75 @@
android:indeterminate="true"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<ani.dantotsu.FadingEdgeRecyclerView
android:id="@+id/characterRecyclerView"
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:padding="16dp"
android:requiresFadingEdge="vertical"
android:visibility="gone"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
app:spanCount="2"
tools:itemCount="10"
tools:layoutManager="GridLayoutManager"
tools:listitem="@layout/item_media_compact"
tools:orientation="vertical" />
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingStart="20dp"
android:paddingEnd="20dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<TextView
android:id="@+id/authorCharacterDesc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
android:layout_marginBottom="32dp"
android:alpha="0.58"
tools:ignore="TextContrastCheck"
tools:maxLines="10"
tools:text="@tools:sample/lorem/random" />
<TextView
android:id="@+id/AuthorCharactersText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="32dp"
android:fontFamily="@font/poppins_bold"
android:padding="8dp"
android:text="@string/characters"
android:textSize="18sp"
android:visibility="gone"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<ani.dantotsu.FadingEdgeRecyclerView
android:id="@+id/authorCharactersRecycler"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:nestedScrollingEnabled="true"
android:requiresFadingEdge="horizontal"
android:visibility="gone"
tools:itemCount="4"
tools:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
tools:listitem="@layout/item_media_compact"
tools:orientation="horizontal"
tools:visibility="visible" />
<ani.dantotsu.FadingEdgeRecyclerView
android:id="@+id/characterRecyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:padding="16dp"
android:requiresFadingEdge="vertical"
android:visibility="gone"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
app:spanCount="2"
tools:itemCount="10"
tools:layoutManager="GridLayoutManager"
tools:listitem="@layout/item_media_compact"
tools:orientation="vertical" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
<androidx.cardview.widget.CardView
android:id="@+id/characterClose"

View File

@@ -0,0 +1,117 @@
<?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"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<Button
android:id="@+id/animeSearch"
style="@style/Widget.Material3.Button.TextButton"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginBottom="16dp"
android:fontFamily="@font/poppins_bold"
android:insetTop="0dp"
android:insetBottom="0dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:text="@string/anime"
android:textSize="17sp"
android:textAlignment="viewStart"
android:textAllCaps="false"
android:textColor="?attr/colorOnBackground"
app:cornerRadius="0dp" />
<Button
android:id="@+id/mangaSearch"
style="@style/Widget.Material3.Button.TextButton"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginBottom="16dp"
android:fontFamily="@font/poppins_bold"
android:insetTop="0dp"
android:insetBottom="0dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:text="@string/manga"
android:textSize="17sp"
android:textAlignment="viewStart"
android:textAllCaps="false"
android:textColor="?attr/colorOnBackground"
app:cornerRadius="0dp" />
<Button
android:id="@+id/userSearch"
style="@style/Widget.Material3.Button.TextButton"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginBottom="16dp"
android:fontFamily="@font/poppins_bold"
android:insetTop="0dp"
android:insetBottom="0dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:text="@string/users"
android:textSize="17sp"
android:textAlignment="viewStart"
android:textAllCaps="false"
android:textColor="?attr/colorOnBackground"
app:cornerRadius="0dp" />
<Button
android:id="@+id/characterSearch"
style="@style/Widget.Material3.Button.TextButton"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginBottom="16dp"
android:fontFamily="@font/poppins_bold"
android:insetTop="0dp"
android:insetBottom="0dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:text="@string/characters"
android:textSize="17sp"
android:textAlignment="viewStart"
android:textAllCaps="false"
android:textColor="?attr/colorOnBackground"
app:cornerRadius="0dp" />
<Button
android:id="@+id/staffSearch"
style="@style/Widget.Material3.Button.TextButton"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginBottom="16dp"
android:fontFamily="@font/poppins_bold"
android:insetTop="0dp"
android:insetBottom="0dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:text="@string/staff"
android:textSize="17sp"
android:textAlignment="viewStart"
android:textAllCaps="false"
android:textColor="?attr/colorOnBackground"
app:cornerRadius="0dp" />
<Button
android:id="@+id/studioSearch"
style="@style/Widget.Material3.Button.TextButton"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginBottom="16dp"
android:fontFamily="@font/poppins_bold"
android:insetTop="0dp"
android:insetBottom="0dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:text="@string/studios"
android:textSize="17sp"
android:textAlignment="viewStart"
android:textAllCaps="false"
android:textColor="?attr/colorOnBackground"
app:cornerRadius="0dp" />
</LinearLayout>

View File

@@ -624,6 +624,9 @@
<string name="age">"__Age:__ "</string>
<string name="birthday">\n"__Birthday:__ "</string>
<string name="gender">\n"__Gender:__ "</string>"
<string name="hometown">\n"__Home Town:__ "</string>
<string name="years_active">\n"__Years Active:__ "</string>
<string name="date_of_death">\n"__Date of Death:__ "</string>
<string name="male">Male</string>
<string name="female">Female</string>
@@ -1097,5 +1100,6 @@ Non quae tempore quo provident laudantium qui illo dolor vel quia dolor et exerc
<string name="privacy_policy">Privacy Policy</string>
<string name="privacy_policy_desc">Read our privacy policy</string>
<string name="failed_to_load">Failed to load</string>
<string name="studios">Studios</string>
</resources>