feat: following / followers page

This commit is contained in:
rebelonion 2024-03-05 19:33:42 -06:00
parent 8da0092561
commit 31afbd547e
17 changed files with 546 additions and 215 deletions

View file

@ -1,38 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
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"
android:orientation="vertical">
<ProgressBar
android:id="@+id/listProgressBar"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone"/>
android:visibility="gone" />
<TextView
android:id="@+id/listTitle"
<FrameLayout
android:layout_marginTop="16dp"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginStart="32dp"
android:ellipsize="end"
android:fontFamily="@font/poppins_bold"
android:gravity="center|start"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.Widget.AppCompat.Toolbar.Title"
android:textColor="?attr/colorOnBackground"
android:textSize="16sp"
tools:text="xyz" />
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/listBack"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:layout_marginStart="12dp"
android:src="@drawable/ic_round_arrow_back_ios_new_24"
app:tint="?attr/colorOnBackground"
tools:ignore="ContentDescription" />
<TextView
android:id="@+id/listTitle"
android:layout_width="wrap_content"
android:layout_height="36dp"
android:layout_marginStart="44dp"
android:ellipsize="end"
android:fontFamily="@font/poppins_bold"
android:gravity="center|start"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.Widget.AppCompat.Toolbar.Title"
android:textColor="?attr/colorOnBackground"
android:textSize="18sp"
tools:text="xyz" />
<androidx.cardview.widget.CardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|center_vertical"
android:layout_marginEnd="8dp"
app:cardBackgroundColor="@color/nav_bg_inv"
app:cardCornerRadius="16dp"
app:cardElevation="0dp">
<ImageButton
android:id="@+id/followerList"
android:layout_width="36dp"
android:layout_height="36dp"
android:alpha="0.33"
android:background="?android:attr/selectableItemBackground"
android:scaleX="-1"
app:srcCompat="@drawable/ic_round_view_list_24"
app:tint="?attr/colorOnBackground"
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|center_vertical"
android:layout_marginEnd="46dp"
app:cardBackgroundColor="@color/nav_bg_inv"
app:cardCornerRadius="16dp"
app:cardElevation="0dp">
<ImageButton
android:id="@+id/followerGrid"
android:layout_width="36dp"
android:layout_height="36dp"
android:alpha="0.33"
android:background="?android:attr/selectableItemBackground"
app:srcCompat="@drawable/ic_round_grid_view_24"
app:tint="?attr/colorOnBackground"
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
</androidx.cardview.widget.CardView>
</FrameLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/listRecyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
tools:listitem="@layout/item_follow"/>
android:layout_marginEnd="16dp"
tools:listitem="@layout/item_follower" />
</LinearLayout>

View file

@ -22,102 +22,104 @@
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="none"
android:layout_marginBottom="72dp">
android:layout_marginBottom="72dp"
android:scrollbars="none">
<LinearLayout
android:id="@+id/profileTopContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
tools:visibility="visible"
android:layout_height="match_parent"
android:orientation="vertical">
<com.flaviofaria.kenburnsview.KenBurnsView
android:id="@+id/profileBannerImage"
<FrameLayout
android:id="@+id/profileTopContainer"
android:layout_width="match_parent"
android:layout_height="200dp"
android:scaleType="centerCrop"
tools:ignore="ContentDescription"
tools:src="@tools:sample/backgrounds/scenic" />
<ImageView
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_marginTop="-200dp"
android:src="@drawable/linear_gradient_bg"
tools:ignore="ContentDescription" />
<LinearLayout
android:id="@+id/profileUserDataContainer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="-171dp"
android:layout_gravity="center"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="visible">
<com.google.android.material.card.MaterialCardView
android:id="@+id/profileUserAvatarContainer"
android:layout_width="82dp"
android:layout_height="82dp"
android:layout_gravity="center"
android:backgroundTint="@color/transparent"
app:cardCornerRadius="64dp">
<com.flaviofaria.kenburnsview.KenBurnsView
android:id="@+id/profileBannerImage"
android:layout_width="match_parent"
android:layout_height="200dp"
android:scaleType="centerCrop"
tools:ignore="ContentDescription"
tools:src="@tools:sample/backgrounds/scenic" />
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/profileUserAvatar"
<ImageView
android:id="@+id/profileBannerGradient"
android:layout_width="match_parent"
android:layout_height="200dp"
android:src="@drawable/linear_gradient_bg"
tools:ignore="ContentDescription" />
<LinearLayout
android:id="@+id/profileUserDataContainer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|bottom"
android:orientation="vertical"
tools:visibility="visible">
<com.google.android.material.card.MaterialCardView
android:id="@+id/profileUserAvatarContainer"
android:layout_width="82dp"
android:layout_height="82dp"
android:layout_gravity="center"
app:srcCompat="@drawable/ic_round_add_circle_24"
tools:tint="@color/transparent"
tools:ignore="ContentDescription,ImageContrastCheck" />
android:backgroundTint="@color/transparent"
app:cardCornerRadius="64dp">
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/profileUserAvatar"
android:layout_width="82dp"
android:layout_height="82dp"
android:layout_gravity="center"
app:srcCompat="@drawable/ic_round_add_circle_24"
tools:ignore="ContentDescription,ImageContrastCheck"
tools:tint="@color/transparent" />
<TextView
android:id="@+id/profileUserName"
</com.google.android.material.card.MaterialCardView>
<TextView
android:id="@+id/profileUserName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:fontFamily="@font/poppins_semi_bold"
android:text="@string/username"
android:textColor="?attr/colorPrimary"
android:textSize="18sp" />
<Button
android:id="@+id/followButton"
style="@style/Widget.Material3.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:backgroundTint="?attr/colorPrimaryContainer"
android:enabled="true"
android:fontFamily="@font/poppins_bold"
android:text="Follow"
android:textColor="@color/bg_opp"
android:textSize="14sp"
app:cornerRadius="8dp"
app:strokeColor="?attr/colorPrimaryContainer"
tools:ignore="SpeakableTextPresentCheck" />
</LinearLayout>
<ImageView
android:id="@+id/profileMenuButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_gravity="center"
android:textColor="?attr/colorPrimary"
android:fontFamily="@font/poppins_semi_bold"
android:text="@string/username"
android:textSize="18sp" />
<Button
android:id="@+id/followButton"
style="@style/Widget.Material3.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:enabled="true"
android:layout_gravity="center"
android:fontFamily="@font/poppins_bold"
android:textColor="@color/bg_opp"
android:text="Follow"
android:textSize="14sp"
android:backgroundTint="?attr/colorPrimaryContainer"
app:cornerRadius="8dp"
app:strokeColor="?attr/colorPrimaryContainer"
tools:ignore="SpeakableTextPresentCheck" />
<Button
android:id="@+id/temp"
style="@style/Widget.Material3.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:enabled="true"
android:layout_gravity="center"
android:fontFamily="@font/poppins_bold"
android:textColor="@color/bg_opp"
android:text="temp"
android:textSize="14sp"
android:backgroundTint="?attr/colorPrimaryContainer"
app:cornerRadius="8dp"
app:strokeColor="?attr/colorPrimaryContainer"
tools:ignore="SpeakableTextPresentCheck" />
</LinearLayout>
android:layout_gravity="end"
android:layout_marginTop="20dp"
android:layout_marginEnd="16dp"
android:contentDescription="@string/menu"
android:src="@drawable/ic_round_dots_vertical_24" />
</FrameLayout>
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/profileViewPager"
@ -126,6 +128,7 @@
tools:ignore="SpeakableTextPresentCheck" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>

View file

@ -141,12 +141,12 @@
android:id="@+id/profileUserStatsTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="32dp"
android:fontFamily="@font/poppins_bold"
android:text="Stats"
android:textSize="16sp"
android:textSize="18sp"
tools:ignore="HardcodedText" />
<TableLayout
@ -341,18 +341,19 @@
android:id="@+id/profileUserBioTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="32dp"
android:fontFamily="@font/poppins_bold"
android:text="Bio"
android:textSize="16sp"
android:textSize="18sp"
tools:ignore="HardcodedText" />
<WebView
android:id="@+id/profileUserBio"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:textAlignment="textStart"
@ -373,11 +374,11 @@
android:id="@+id/profileFavAnime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginStart="8dp"
android:fontFamily="@font/poppins_bold"
android:padding="8dp"
android:text="@string/fav_anime"
android:textSize="16sp" />
android:textSize="18sp" />
<FrameLayout
android:layout_width="match_parent"
@ -447,11 +448,11 @@
android:id="@+id/profileFavManga"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginStart="8dp"
android:fontFamily="@font/poppins_bold"
android:padding="8dp"
android:text="@string/fav_manga"
android:textSize="16sp" />
android:textSize="18sp" />
<FrameLayout
android:layout_width="match_parent"
@ -517,12 +518,12 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="32dp"
android:fontFamily="@font/poppins_bold"
android:text="Favorite Characters"
android:textSize="16sp" />
android:textSize="18sp" />
<ani.dantotsu.FadingEdgeRecyclerView
android:id="@+id/profileFavCharactersRecycler"
@ -548,12 +549,12 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="32dp"
android:fontFamily="@font/poppins_bold"
android:text="Favorite Staff"
android:textSize="16sp" />
android:textSize="18sp" />
<ani.dantotsu.FadingEdgeRecyclerView
android:id="@+id/profileFavStaffRecycler"

View file

@ -1,55 +0,0 @@
<androidx.cardview.widget.CardView 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="80dp"
app:cardCornerRadius="16dp"
android:layout_marginBottom="16dp">
<ImageView
android:id="@+id/followBanner"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:ignore="ContentDescription,ImageContrastCheck" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="80dp"
android:orientation="horizontal">
<androidx.cardview.widget.CardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_gravity="center"
app:cardCornerRadius="32dp">
<ImageView
android:id="@+id/followProfile"
android:layout_width="64dp"
android:layout_height="64dp"
tools:ignore="ContentDescription,ImageContrastCheck"
tools:srcCompat="@tools:sample/avatars" />
</androidx.cardview.widget.CardView>
<TextView
android:id="@+id/followName"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingStart="10dp"
android:gravity="center_vertical"
android:fontFamily="@font/poppins_bold"
android:textColor="?attr/colorSecondary"
tools:text="Username"
tools:ignore="RtlSymmetry" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_gravity="bottom"
android:layout_height="4dp"
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:background="?android:attr/listDivider" />
</androidx.cardview.widget.CardView>

View file

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="120dp"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_marginBottom="8dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/profileBannerImage"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/linear_gradient_bg"
tools:ignore="ContentDescription" />
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg_black_50"
tools:ignore="ContentDescription" />
<com.google.android.material.card.MaterialCardView
android:id="@+id/profileUserAvatarContainer"
android:layout_width="82dp"
android:layout_height="82dp"
android:layout_gravity="start|center_vertical"
android:layout_marginStart="16dp"
android:backgroundTint="@color/bg_white"
app:cardCornerRadius="64dp">
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/profileUserAvatar"
android:layout_width="82dp"
android:layout_height="82dp"
android:layout_gravity="center"
app:srcCompat="@drawable/ic_round_add_circle_24"
tools:tint="@color/transparent"
tools:ignore="ContentDescription,ImageContrastCheck" />
</com.google.android.material.card.MaterialCardView>
<TextView
android:id="@+id/profileUserName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:layout_marginStart="120dp"
android:text="Username"
android:textColor="@color/bg_white"
android:textSize="18sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
</FrameLayout>

View file

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="150dp"
android:padding="8dp"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical">
<ImageView
android:id="@+id/profileUserAvatar"
android:layout_width="112dp"
android:layout_height="112dp"
android:layout_gravity="center"
tools:tint="@color/transparent"
tools:ignore="ContentDescription,ImageContrastCheck" />
<TextView
android:id="@+id/profileUserName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|center_vertical"
android:text="Username"
android:textColor="?attr/colorOnBackground"
android:textSize="12sp"
android:ellipsize="end"
android:textStyle="bold"
tools:ignore="HardcodedText" />
</LinearLayout>