feat: more options in anime and manga side

This commit is contained in:
aayush262 2024-03-30 02:39:47 +05:30
parent 7951c2cf37
commit 2dc3035a7c
18 changed files with 657 additions and 53 deletions

View file

@ -181,7 +181,6 @@
android:id="@+id/settingsShowYt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:checked="true"
android:drawableStart="@drawable/ic_round_play_circle_24"
android:drawablePadding="16dp"
@ -195,5 +194,23 @@
app:drawableTint="?attr/colorPrimary"
app:showText="false"
app:thumbTint="@color/button_switch_track" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/settingsIncludeAnimeList"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:checked="true"
android:drawableStart="@drawable/ic_round_movie_filter_24"
android:drawablePadding="16dp"
android:elegantTextHeight="true"
android:fontFamily="@font/poppins_bold"
android:minHeight="64dp"
android:text="@string/include_list"
android:textAlignment="viewStart"
android:textColor="?attr/colorOnBackground"
app:cornerRadius="0dp"
app:drawableTint="?attr/colorPrimary"
app:showText="false"
app:thumbTint="@color/button_switch_track" />
</ani.dantotsu.others.Xpandable>
</merge>

View file

@ -158,7 +158,23 @@
app:iconPadding="16dp"
app:iconSize="24dp"
app:iconTint="?attr/colorPrimary" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/settingsIncludeMangaList"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="true"
android:drawableStart="@drawable/ic_round_movie_filter_24"
android:drawablePadding="16dp"
android:elegantTextHeight="true"
android:fontFamily="@font/poppins_bold"
android:minHeight="64dp"
android:text="@string/include_list"
android:textAlignment="viewStart"
android:textColor="?attr/colorOnBackground"
app:cornerRadius="0dp"
app:drawableTint="?attr/colorPrimary"
app:showText="false"
app:thumbTint="@color/button_switch_track" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"

View file

@ -218,6 +218,126 @@
</FrameLayout>
<TextView
android:id="@+id/animeMovies"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:fontFamily="@font/poppins_bold"
android:padding="8dp"
android:text="@string/trending_movies"
android:textSize="16sp"
android:visibility="invisible"
tools:visibility="visible" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="250dp">
<ProgressBar
android:id="@+id/animeMoviesProgressBar"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_gravity="center" />
<ani.dantotsu.FadingEdgeRecyclerView
android:id="@+id/animeMoviesRecyclerView"
android:layout_width="match_parent"
android:layout_height="250dp"
android:clipToPadding="false"
android:nestedScrollingEnabled="true"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:requiresFadingEdge="horizontal"
tools:itemCount="4"
tools:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_media_compact"
tools:orientation="horizontal" />
</FrameLayout>
<TextView
android:id="@+id/animeTopRated"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:fontFamily="@font/poppins_bold"
android:padding="8dp"
android:text="@string/top_rated"
android:textSize="16sp"
android:visibility="invisible"
tools:visibility="visible" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="250dp">
<ProgressBar
android:id="@+id/animeTopRatedProgressBar"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_gravity="center" />
<ani.dantotsu.FadingEdgeRecyclerView
android:id="@+id/animeTopRatedRecyclerView"
android:layout_width="match_parent"
android:layout_height="250dp"
android:clipToPadding="false"
android:nestedScrollingEnabled="true"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:requiresFadingEdge="horizontal"
tools:itemCount="4"
tools:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_media_compact"
tools:orientation="horizontal" />
</FrameLayout>
<TextView
android:id="@+id/animeMostFav"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:fontFamily="@font/poppins_bold"
android:padding="8dp"
android:text="@string/most_favourite"
android:textSize="16sp"
android:visibility="invisible"
tools:visibility="visible" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="250dp">
<ProgressBar
android:id="@+id/animeMostFavProgressBar"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_gravity="center" />
<ani.dantotsu.FadingEdgeRecyclerView
android:id="@+id/animeMostFavRecyclerView"
android:layout_width="match_parent"
android:layout_height="250dp"
android:clipToPadding="false"
android:nestedScrollingEnabled="true"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:requiresFadingEdge="horizontal"
tools:itemCount="4"
tools:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_media_compact"
tools:orientation="horizontal" />
</FrameLayout>
<LinearLayout
android:id="@+id/animePopular"
android:layout_width="match_parent"

View file

@ -125,6 +125,82 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/mangaTrendingManga"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:fontFamily="@font/poppins_bold"
android:padding="8dp"
android:text="@string/trending_manga"
android:textSize="16sp" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="250dp">
<ProgressBar
android:id="@+id/mangaTrendingMangaProgressBar"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_gravity="center" />
<ani.dantotsu.FadingEdgeRecyclerView
android:id="@+id/mangaTrendingMangaRecyclerView"
android:layout_width="match_parent"
android:layout_height="250dp"
android:clipToPadding="false"
android:nestedScrollingEnabled="true"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:requiresFadingEdge="horizontal"
tools:itemCount="4"
tools:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_media_compact"
tools:orientation="horizontal" />
</FrameLayout>
<TextView
android:id="@+id/mangaTrendingManhwa"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:fontFamily="@font/poppins_bold"
android:padding="8dp"
android:text="@string/trending_manhwa"
android:textSize="16sp" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="250dp">
<ProgressBar
android:id="@+id/mangaTrendingManhwaProgressBar"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_gravity="center" />
<ani.dantotsu.FadingEdgeRecyclerView
android:id="@+id/mangaTrendingManhwaRecyclerView"
android:layout_width="match_parent"
android:layout_height="250dp"
android:clipToPadding="false"
android:nestedScrollingEnabled="true"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:requiresFadingEdge="horizontal"
tools:itemCount="4"
tools:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_media_compact"
tools:orientation="horizontal" />
</FrameLayout>
<TextView
android:id="@+id/mangaNovel"
android:layout_width="match_parent"
@ -163,6 +239,82 @@
</FrameLayout>
<TextView
android:id="@+id/mangaTopRated"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:fontFamily="@font/poppins_bold"
android:padding="8dp"
android:text="@string/top_rated"
android:textSize="16sp" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="250dp">
<ProgressBar
android:id="@+id/mangaTopRatedProgressBar"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_gravity="center" />
<ani.dantotsu.FadingEdgeRecyclerView
android:id="@+id/mangaTopRatedRecyclerView"
android:layout_width="match_parent"
android:layout_height="250dp"
android:clipToPadding="false"
android:nestedScrollingEnabled="true"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:requiresFadingEdge="horizontal"
tools:itemCount="4"
tools:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_media_compact"
tools:orientation="horizontal" />
</FrameLayout>
<TextView
android:id="@+id/mangaMostFav"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:fontFamily="@font/poppins_bold"
android:padding="8dp"
android:text="@string/most_favourite"
android:textSize="16sp" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="250dp">
<ProgressBar
android:id="@+id/mangaMostFavProgressBar"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_gravity="center" />
<ani.dantotsu.FadingEdgeRecyclerView
android:id="@+id/mangaMostFavRecyclerView"
android:layout_width="match_parent"
android:layout_height="250dp"
android:clipToPadding="false"
android:nestedScrollingEnabled="true"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:requiresFadingEdge="horizontal"
tools:itemCount="4"
tools:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_media_compact"
tools:orientation="horizontal" />
</FrameLayout>
<LinearLayout
android:id="@+id/mangaPopular"
android:layout_width="match_parent"

View file

@ -1,10 +1,9 @@
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:theme="@style/Theme.Dantotsu.AppWidgetContainer"
android:orientation="vertical">
android:orientation="vertical"
android:theme="@style/Theme.Dantotsu.AppWidgetContainer">
<ImageView
android:id="@+id/backgroundView"
@ -12,24 +11,26 @@
android:layout_height="match_parent"
android:scaleType="fitXY"
android:src="@drawable/widget_stats_rounded"
tools:ignore="ContentDescription"/>
tools:ignore="ContentDescription" />
<LinearLayout
android:id="@+id/headerLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:layout_margin="4dp"
android:orientation="horizontal"
android:baselineAligned="false">
android:baselineAligned="false"
android:gravity="center_horizontal"
android:orientation="horizontal">
<ImageView
android:id="@+id/userAvatar"
android:layout_width="32dp"
android:layout_height="32dp"
android:scaleType="fitCenter"
android:src="@drawable/ic_dantotsu_round"
tools:ignore="ContentDescription"/>
tools:ignore="ContentDescription" />
<TextView
android:id="@+id/userLabel"
android:layout_width="wrap_content"
@ -37,26 +38,28 @@
android:layout_gravity="center"
android:layout_marginStart="8dp"
android:fontFamily="@font/poppins_bold"
android:textSize="18sp"
android:text="@string/loading"/>
android:text="@string/loading"
android:textSize="18sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/headerLayout"
android:layout_gravity="center"
android:gravity="center"
android:padding="4dp"
android:orientation="vertical"
android:background="@drawable/widget_stats_rounded"
android:layout_below="@id/headerLayout">
android:gravity="center"
android:orientation="vertical"
android:padding="4dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_gravity="center"
android:orientation="horizontal"
android:baselineAligned="false">
android:layout_weight="1"
android:baselineAligned="false"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/topLeft"
android:layout_width="match_parent"
@ -65,20 +68,22 @@
android:layout_weight="1"
android:orientation="vertical"
tools:ignore="NestedWeights">
<TextView
android:id="@+id/topLeftItem"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:fontFamily="@font/poppins_bold"
android:text="@string/loading"/>
android:text="@string/loading" />
<TextView
android:id="@+id/topLeftLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:fontFamily="@font/poppins_semi_bold"
android:gravity="center"
android:text="@string/anime_watched" />
</LinearLayout>
@ -96,21 +101,23 @@
android:layout_gravity="center"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/topRightItem"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:fontFamily="@font/poppins_bold"
android:text="@string/loading"/>
android:text="@string/loading" />
<TextView
android:id="@+id/topRightLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:fontFamily="@font/poppins_semi_bold"
android:text="@string/episodes_watched_n"/>
android:gravity="center"
android:text="@string/episodes_watched_n" />
</LinearLayout>
</LinearLayout>
@ -125,10 +132,11 @@
android:id="@+id/bottomLeft"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_gravity="center"
android:orientation="horizontal"
android:baselineAligned="false">
android:layout_weight="1"
android:baselineAligned="false"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -136,21 +144,23 @@
android:layout_weight="1"
android:orientation="vertical"
tools:ignore="NestedWeights">
<TextView
android:id="@+id/bottomLeftItem"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:fontFamily="@font/poppins_bold"
android:text="@string/loading"/>
android:text="@string/loading" />
<TextView
android:id="@+id/bottomLeftLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/poppins_semi_bold"
android:text="@string/manga_read"
android:layout_gravity="center"
android:gravity="center"/>
android:fontFamily="@font/poppins_semi_bold"
android:gravity="center"
android:text="@string/manga_read" />
</LinearLayout>
<RelativeLayout
@ -167,21 +177,23 @@
android:layout_gravity="center"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/bottomRightItem"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:fontFamily="@font/poppins_bold"
android:text="@string/loading"/>
android:text="@string/loading" />
<TextView
android:id="@+id/bottomRightLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:fontFamily="@font/poppins_semi_bold"
android:text="@string/chapters_read_n"/>
android:gravity="center"
android:text="@string/chapters_read_n" />
</LinearLayout>
</LinearLayout>
</LinearLayout>