Dantotsu/app/src/main/res/layout/fragment_profile.xml
TwistedUmbrellaX 77c57846ed
fix: add padding to last item in recycler (#293)
* fix: add padding to last item in recycler

Stop guessing numbers to compensate for a view we can measure. by adding a method to measure them.

* fix: avoid scrolling artifacts in nested
2024-03-26 16:10:02 -05:00

363 lines
15 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:scrollbars="none"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="true"
android:orientation="vertical">
<LinearLayout
android:id="@+id/userStatsContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/profileUserStatsTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="32dp"
android:fontFamily="@font/poppins_bold"
android:padding="8dp"
android:text="@string/stats"
android:textSize="18sp"
tools:ignore="HardcodedText" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingStart="32dp"
android:paddingTop="16dp"
android:paddingEnd="32dp"
android:paddingBottom="16dp">
<TableRow
android:layout_width="match_parent"
android:layout_height="24dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha="0.58"
android:text="@string/episodes_watched"
android:textStyle="bold" />
<TextView
android:id="@+id/statsEpisodesWatched"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:fontFamily="@font/poppins_bold"
android:textAlignment="textEnd" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="24dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha="0.58"
android:text="@string/days_watched"
android:textStyle="bold" />
<TextView
android:id="@+id/statsDaysWatched"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:fontFamily="@font/poppins_bold"
android:textAlignment="textEnd" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="24dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha="0.58"
android:text="@string/anime_mean_score"
android:textStyle="bold" />
<TextView
android:id="@+id/statsAnimeMeanScore"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:fontFamily="@font/poppins_bold"
android:textAlignment="textEnd" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="24dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha="0.58"
android:text="@string/chapters_read"
android:textStyle="bold" />
<TextView
android:id="@+id/statsChaptersRead"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:fontFamily="@font/poppins_bold"
android:textAlignment="textEnd" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="24dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha="0.58"
android:text="@string/volume_read"
android:textStyle="bold" />
<TextView
android:id="@+id/statsVolumeRead"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:fontFamily="@font/poppins_bold"
android:textAlignment="textEnd" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="24dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha="0.58"
android:text="@string/manga_mean_score"
android:textStyle="bold" />
<TextView
android:id="@+id/statsMangaMeanScore"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:fontFamily="@font/poppins_bold"
android:textAlignment="textEnd" />
</TableRow>
</TableLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/userInfoContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:layout_height="wrap_content">
<TextView
android:id="@+id/profileUserBioTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="32dp"
android:fontFamily="@font/poppins_bold"
android:padding="8dp"
android:text="@string/about_me"
android:textSize="18sp" />
<WebView
android:id="@+id/profileUserBio"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:ellipsize="end"
android:nestedScrollingEnabled="true"
android:padding="16dp"
android:textAlignment="textStart"
tools:text="@string/slogan" />
</LinearLayout>
<LinearLayout
android:id="@+id/profileFavAnimeContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
<TextView
android:id="@+id/profileFavAnime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:fontFamily="@font/poppins_bold"
android:padding="8dp"
android:text="@string/fav_anime"
android:textSize="18sp" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ProgressBar
android:id="@+id/profileFavAnimeProgressBar"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="90dp" />
<ani.dantotsu.FadingEdgeRecyclerView
android:id="@+id/profileFavAnimeRecyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
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>
<LinearLayout
android:id="@+id/profileFavMangaContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
<TextView
android:id="@+id/profileFavManga"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:fontFamily="@font/poppins_bold"
android:padding="8dp"
android:text="@string/fav_manga"
android:textSize="18sp" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ProgressBar
android:id="@+id/profileFavMangaProgressBar"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="90dp" />
<ani.dantotsu.FadingEdgeRecyclerView
android:id="@+id/profileFavMangaRecyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
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>
<LinearLayout
android:id="@+id/profileFavCharactersContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
tools:visibility="gone">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="32dp"
android:fontFamily="@font/poppins_bold"
android:padding="8dp"
android:text="@string/fav_character"
android:textSize="18sp" />
<ani.dantotsu.FadingEdgeRecyclerView
android:id="@+id/profileFavCharactersRecycler"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:nestedScrollingEnabled="true"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:requiresFadingEdge="horizontal"
tools:itemCount="4"
tools:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
tools:listitem="@layout/item_media_compact"
tools:orientation="horizontal" />
</LinearLayout>
<LinearLayout
android:id="@+id/profileFavStaffContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
tools:visibility="gone">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="32dp"
android:fontFamily="@font/poppins_bold"
android:padding="8dp"
android:text="@string/fav_staff"
android:textSize="18sp" />
<ani.dantotsu.FadingEdgeRecyclerView
android:id="@+id/profileFavStaffRecycler"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:nestedScrollingEnabled="true"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:requiresFadingEdge="horizontal"
tools:itemCount="4"
tools:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
tools:listitem="@layout/item_media_compact"
tools:orientation="horizontal" />
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>