feat(profile page): something
This commit is contained in:
parent
86ed721796
commit
790ab1a343
3 changed files with 56 additions and 106 deletions
|
@ -99,8 +99,6 @@ class ProfileActivity : AppCompatActivity(){
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
binding.profileUserName.text = "${user.name} $userLevel"
|
binding.profileUserName.text = "${user.name} $userLevel"
|
||||||
binding.profileUserEpisodesWatched.text = user.statistics.anime.episodesWatched.toString()
|
|
||||||
binding.profileUserChaptersRead.text = user.statistics.manga.chaptersRead.toString()
|
|
||||||
if (!(PrefManager.getVal(PrefName.BannerAnimations) as Boolean)) binding.profileBannerImage.pause()
|
if (!(PrefManager.getVal(PrefName.BannerAnimations) as Boolean)) binding.profileBannerImage.pause()
|
||||||
binding.profileBannerImage.loadImage(user.bannerImage)
|
binding.profileBannerImage.loadImage(user.bannerImage)
|
||||||
binding.profileBannerImage.updateLayoutParams { height += statusBarHeight }
|
binding.profileBannerImage.updateLayoutParams { height += statusBarHeight }
|
||||||
|
|
|
@ -46,13 +46,22 @@
|
||||||
android:src="@drawable/linear_gradient_bg"
|
android:src="@drawable/linear_gradient_bg"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/profileUserDataContainer"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="-124dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:orientation="vertical"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
<com.google.android.material.card.MaterialCardView
|
||||||
android:id="@+id/profileUserAvatarContainer"
|
android:id="@+id/profileUserAvatarContainer"
|
||||||
android:layout_width="82dp"
|
android:layout_width="82dp"
|
||||||
android:layout_height="82dp"
|
android:layout_height="82dp"
|
||||||
android:layout_gravity="end"
|
android:layout_gravity="center"
|
||||||
android:layout_marginTop="-52dp"
|
android:backgroundTint="@color/bg_opp"
|
||||||
android:layout_marginEnd="32dp"
|
|
||||||
app:cardCornerRadius="64dp">
|
app:cardCornerRadius="64dp">
|
||||||
|
|
||||||
<com.google.android.material.imageview.ShapeableImageView
|
<com.google.android.material.imageview.ShapeableImageView
|
||||||
|
@ -61,73 +70,21 @@
|
||||||
android:layout_height="78dp"
|
android:layout_height="78dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
app:srcCompat="@drawable/ic_round_add_circle_24"
|
app:srcCompat="@drawable/ic_round_add_circle_24"
|
||||||
|
tools:tint="@color/bg"
|
||||||
tools:ignore="ContentDescription,ImageContrastCheck" />
|
tools:ignore="ContentDescription,ImageContrastCheck" />
|
||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/profileUserDataContainer"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="18dp"
|
|
||||||
android:layout_marginTop="-24dp"
|
|
||||||
android:orientation="vertical"
|
|
||||||
tools:visibility="visible">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/profileUserName"
|
android:id="@+id/profileUserName"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:textColor="?attr/colorPrimary"
|
||||||
android:fontFamily="@font/poppins_semi_bold"
|
android:fontFamily="@font/poppins_semi_bold"
|
||||||
android:text="@string/username"
|
android:text="@string/username"
|
||||||
android:textSize="18sp" />
|
android:textSize="18sp" />
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:alpha="0.58"
|
|
||||||
android:fontFamily="@font/poppins"
|
|
||||||
android:text="@string/episodes_watched"
|
|
||||||
android:textSize="12sp"
|
|
||||||
tools:ignore="TextContrastCheck,TooDeepLayout" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/profileUserEpisodesWatched"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:fontFamily="@font/poppins_bold"
|
|
||||||
android:textColor="?attr/colorPrimaryVariant"
|
|
||||||
android:textSize="12sp" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:alpha="0.58"
|
|
||||||
android:fontFamily="@font/poppins"
|
|
||||||
android:text="@string/chapters_read"
|
|
||||||
android:textSize="12sp"
|
|
||||||
tools:ignore="TextContrastCheck" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/profileUserChaptersRead"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:fontFamily="@font/poppins_bold"
|
|
||||||
android:textColor="?attr/colorPrimaryVariant"
|
|
||||||
android:textSize="12sp" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -12,16 +12,6 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="18dp"
|
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:fontFamily="@font/poppins_semi_bold"
|
|
||||||
android:text="List"
|
|
||||||
android:textSize="18sp"
|
|
||||||
tools:ignore="HardcodedText" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -140,33 +130,6 @@
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/userInfoContainer"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/profileUserBioTitle"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="18dp"
|
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:fontFamily="@font/poppins_semi_bold"
|
|
||||||
android:text="Bio"
|
|
||||||
android:textSize="18sp"
|
|
||||||
tools:ignore="HardcodedText" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/profileUserBio"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:fontFamily="@font/poppins_semi_bold"
|
|
||||||
android:layout_marginStart="18dp"
|
|
||||||
android:layout_marginEnd="18dp"
|
|
||||||
android:alpha="0.58"
|
|
||||||
android:textSize="12sp"
|
|
||||||
tools:text="@tools:sample/lorem"/>
|
|
||||||
</LinearLayout>
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/userStatsContainer"
|
android:id="@+id/userStatsContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -178,6 +141,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="18dp"
|
android:layout_marginStart="18dp"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
|
android:textColor="?attr/colorPrimary"
|
||||||
android:fontFamily="@font/poppins_semi_bold"
|
android:fontFamily="@font/poppins_semi_bold"
|
||||||
android:text="Stats"
|
android:text="Stats"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
|
@ -363,4 +327,35 @@
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</TableLayout>
|
</TableLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/userInfoContainer"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/profileUserBioTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="18dp"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:textColor="?attr/colorPrimary"
|
||||||
|
android:fontFamily="@font/poppins_semi_bold"
|
||||||
|
android:text="Bio"
|
||||||
|
android:textSize="18sp"
|
||||||
|
tools:ignore="HardcodedText" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/profileUserBio"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="@font/poppins_semi_bold"
|
||||||
|
android:paddingStart="32dp"
|
||||||
|
android:paddingTop="16dp"
|
||||||
|
android:paddingEnd="32dp"
|
||||||
|
android:alpha="0.58"
|
||||||
|
android:textSize="12sp"
|
||||||
|
tools:text="@tools:sample/lorem"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
Loading…
Add table
Add a link
Reference in a new issue