Merge branch 'dev' of https://github.com/rebelonion/Dantotsu into dev
This commit is contained in:
commit
fcd5c621de
7 changed files with 428 additions and 215 deletions
|
@ -54,7 +54,7 @@ class AnilistQueries {
|
||||||
|
|
||||||
suspend fun getUserProfile(id: Int): Query.UserProfileResponse? {
|
suspend fun getUserProfile(id: Int): Query.UserProfileResponse? {
|
||||||
return executeQuery<Query.UserProfileResponse>(
|
return executeQuery<Query.UserProfileResponse>(
|
||||||
"""{user:User(id:$id){id,name,about(asHtml:true)avatar{medium,large},bannerImage,isFollowing,isFollower,isBlocked,favourites{anime{nodes{coverImage{extraLarge,large,medium,color}}}manga{nodes{id,coverImage{extraLarge,large,medium,color}}}characters{nodes{id,image{large,medium}}}staff{nodes{id,image{large,medium}}}studios{nodes{id,name}}}statistics{anime{count,meanScore,standardDeviation,minutesWatched,episodesWatched,chaptersRead,volumesRead}manga{count,meanScore,standardDeviation,minutesWatched,episodesWatched,chaptersRead,volumesRead}}siteUrl}}""",
|
"""{user:User(id:$id){id,name,about(asHtml:false)avatar{medium,large},bannerImage,isFollowing,isFollower,isBlocked,favourites{anime{nodes{coverImage{extraLarge,large,medium,color}}}manga{nodes{id,coverImage{extraLarge,large,medium,color}}}characters{nodes{id,image{large,medium}}}staff{nodes{id,image{large,medium}}}studios{nodes{id,name}}}statistics{anime{count,meanScore,standardDeviation,minutesWatched,episodesWatched,chaptersRead,volumesRead}manga{count,meanScore,standardDeviation,minutesWatched,episodesWatched,chaptersRead,volumesRead}}siteUrl}}""",
|
||||||
force = true
|
force = true
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ import ani.dantotsu.connections.comments.CommentsAPI
|
||||||
import ani.dantotsu.copyToClipboard
|
import ani.dantotsu.copyToClipboard
|
||||||
import ani.dantotsu.databinding.ItemCommentsBinding
|
import ani.dantotsu.databinding.ItemCommentsBinding
|
||||||
import ani.dantotsu.loadImage
|
import ani.dantotsu.loadImage
|
||||||
|
import ani.dantotsu.others.ImageViewDialog
|
||||||
import ani.dantotsu.profile.ProfileActivity
|
import ani.dantotsu.profile.ProfileActivity
|
||||||
import ani.dantotsu.snackString
|
import ani.dantotsu.snackString
|
||||||
import com.xwray.groupie.GroupieAdapter
|
import com.xwray.groupie.GroupieAdapter
|
||||||
|
@ -101,7 +102,13 @@ class CommentItem(val comment: Comment,
|
||||||
.putExtra("userId", comment.userId.toInt())
|
.putExtra("userId", comment.userId.toInt())
|
||||||
.putExtra("username","[${levelColor.second}]"), null
|
.putExtra("username","[${levelColor.second}]"), null
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
viewBinding.commentUserAvatar.setOnClickListener {
|
||||||
|
ContextCompat.startActivity(
|
||||||
|
commentsFragment.activity, Intent(commentsFragment.activity, ProfileActivity::class.java)
|
||||||
|
.putExtra("userId", comment.userId.toInt())
|
||||||
|
.putExtra("username","[${levelColor.second}]"), null
|
||||||
|
)
|
||||||
}
|
}
|
||||||
viewBinding.commentText.setOnLongClickListener {
|
viewBinding.commentText.setOnLongClickListener {
|
||||||
copyToClipboard(comment.content)
|
copyToClipboard(comment.content)
|
||||||
|
@ -193,10 +200,15 @@ class CommentItem(val comment: Comment,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
viewBinding.commentTotalVotes.text = (comment.upvotes - comment.downvotes).toString()
|
viewBinding.commentTotalVotes.text = (comment.upvotes - comment.downvotes).toString()
|
||||||
viewBinding.commentUserAvatar
|
viewBinding.commentUserAvatar.setOnLongClickListener {
|
||||||
|
ImageViewDialog.newInstance(
|
||||||
|
commentsFragment.activity,
|
||||||
|
"${comment.username}'s [Cover]",
|
||||||
|
comment.profilePictureUrl
|
||||||
|
)
|
||||||
|
}
|
||||||
comment.profilePictureUrl?.let { viewBinding.commentUserAvatar.loadImage(it) }
|
comment.profilePictureUrl?.let { viewBinding.commentUserAvatar.loadImage(it) }
|
||||||
viewBinding.commentUserName.text = comment.username
|
viewBinding.commentUserName.text = comment.username
|
||||||
|
|
||||||
viewBinding.commentUserLevel.text = "[${levelColor.second}]"
|
viewBinding.commentUserLevel.text = "[${levelColor.second}]"
|
||||||
viewBinding.commentUserLevel.setTextColor(levelColor.first)
|
viewBinding.commentUserLevel.setTextColor(levelColor.first)
|
||||||
viewBinding.commentUserTime.text = formatTimestamp(comment.timestamp)
|
viewBinding.commentUserTime.text = formatTimestamp(comment.timestamp)
|
||||||
|
|
|
@ -4,8 +4,10 @@ import android.annotation.SuppressLint
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
|
import androidx.core.view.updateLayoutParams
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.fragment.app.FragmentManager
|
import androidx.fragment.app.FragmentManager
|
||||||
import androidx.lifecycle.Lifecycle
|
import androidx.lifecycle.Lifecycle
|
||||||
|
@ -20,8 +22,12 @@ import ani.dantotsu.loadImage
|
||||||
import ani.dantotsu.media.Media
|
import ani.dantotsu.media.Media
|
||||||
import ani.dantotsu.media.MediaDetailsActivity
|
import ani.dantotsu.media.MediaDetailsActivity
|
||||||
import ani.dantotsu.media.user.ListActivity
|
import ani.dantotsu.media.user.ListActivity
|
||||||
|
import ani.dantotsu.navBarHeight
|
||||||
import ani.dantotsu.others.ImageViewDialog
|
import ani.dantotsu.others.ImageViewDialog
|
||||||
|
import ani.dantotsu.settings.saving.PrefManager
|
||||||
|
import ani.dantotsu.settings.saving.PrefName
|
||||||
import ani.dantotsu.snackString
|
import ani.dantotsu.snackString
|
||||||
|
import ani.dantotsu.statusBarHeight
|
||||||
import ani.dantotsu.themes.ThemeManager
|
import ani.dantotsu.themes.ThemeManager
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
@ -32,7 +38,7 @@ import nl.joery.animatedbottombar.AnimatedBottomBar
|
||||||
class ProfileActivity : AppCompatActivity(){
|
class ProfileActivity : AppCompatActivity(){
|
||||||
private lateinit var binding: ActivityProfileBinding
|
private lateinit var binding: ActivityProfileBinding
|
||||||
private var selected: Int = 0
|
private var selected: Int = 0
|
||||||
private lateinit var tabLayout: AnimatedBottomBar
|
private lateinit var navBar: AnimatedBottomBar
|
||||||
@SuppressLint("SetTextI18n")
|
@SuppressLint("SetTextI18n")
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
@ -40,15 +46,14 @@ class ProfileActivity : AppCompatActivity(){
|
||||||
initActivity(this)
|
initActivity(this)
|
||||||
binding = ActivityProfileBinding.inflate(layoutInflater)
|
binding = ActivityProfileBinding.inflate(layoutInflater)
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
tabLayout = binding.typeTab
|
navBar = binding.profileNavBar
|
||||||
val profileTab = tabLayout.createTab(R.drawable.ic_round_person_24, "Profile")
|
navBar.updateLayoutParams<ViewGroup.MarginLayoutParams> { bottomMargin = navBarHeight }
|
||||||
val statsTab = tabLayout.createTab(R.drawable.ic_stats_24, "Stats")
|
val profileTab = navBar.createTab(R.drawable.ic_round_person_24, "Profile")
|
||||||
tabLayout.addTab(profileTab)
|
val statsTab = navBar.createTab(R.drawable.ic_stats_24, "Stats")
|
||||||
tabLayout.addTab(statsTab)
|
navBar.addTab(profileTab)
|
||||||
tabLayout.visibility = View.GONE
|
navBar.addTab(statsTab)
|
||||||
|
navBar.visibility = View.GONE
|
||||||
binding.mediaViewPager.isUserInputEnabled = false
|
binding.mediaViewPager.isUserInputEnabled = false
|
||||||
|
|
||||||
|
|
||||||
lifecycleScope.launch(Dispatchers.IO) {
|
lifecycleScope.launch(Dispatchers.IO) {
|
||||||
val userid = intent.getIntExtra("userId", 0)
|
val userid = intent.getIntExtra("userId", 0)
|
||||||
val respond = Anilist.query.getUserProfile(userid)
|
val respond = Anilist.query.getUserProfile(userid)
|
||||||
|
@ -60,9 +65,9 @@ class ProfileActivity : AppCompatActivity(){
|
||||||
}
|
}
|
||||||
withContext(Dispatchers.Main) {
|
withContext(Dispatchers.Main) {
|
||||||
binding.mediaViewPager.adapter = ViewPagerAdapter(supportFragmentManager, lifecycle, user, this@ProfileActivity)
|
binding.mediaViewPager.adapter = ViewPagerAdapter(supportFragmentManager, lifecycle, user, this@ProfileActivity)
|
||||||
tabLayout.visibility = View.VISIBLE
|
navBar.visibility = View.VISIBLE
|
||||||
tabLayout.selectTabAt(selected)
|
navBar.selectTabAt(selected)
|
||||||
tabLayout.setOnTabSelectListener(object : AnimatedBottomBar.OnTabSelectListener {
|
navBar.setOnTabSelectListener(object : AnimatedBottomBar.OnTabSelectListener {
|
||||||
override fun onTabSelected(
|
override fun onTabSelected(
|
||||||
lastIndex: Int,
|
lastIndex: Int,
|
||||||
lastTab: AnimatedBottomBar.Tab?,
|
lastTab: AnimatedBottomBar.Tab?,
|
||||||
|
@ -76,13 +81,27 @@ class ProfileActivity : AppCompatActivity(){
|
||||||
val userLevel = intent.getStringExtra("username")?: ""
|
val userLevel = intent.getStringExtra("username")?: ""
|
||||||
|
|
||||||
binding.profileProgressBar.visibility = View.GONE
|
binding.profileProgressBar.visibility = View.GONE
|
||||||
|
binding.profileTopContainer.visibility = View.VISIBLE
|
||||||
binding.profileBannerImage.loadImage(user.bannerImage)
|
binding.profileBannerImage.loadImage(user.bannerImage)
|
||||||
|
binding.profileBannerImage.setOnLongClickListener {
|
||||||
|
ImageViewDialog.newInstance(
|
||||||
|
this@ProfileActivity,
|
||||||
|
"${user.name}'s [Banner]",
|
||||||
|
user.bannerImage
|
||||||
|
)
|
||||||
|
}
|
||||||
binding.profileUserAvatar.loadImage(user.avatar?.medium)
|
binding.profileUserAvatar.loadImage(user.avatar?.medium)
|
||||||
|
binding.profileUserAvatar.setOnLongClickListener {
|
||||||
|
ImageViewDialog.newInstance(
|
||||||
|
this@ProfileActivity,
|
||||||
|
"${user.name}'s [Avatar]",
|
||||||
|
user.avatar?.medium
|
||||||
|
)
|
||||||
|
}
|
||||||
binding.profileUserName.text = "${user.name} $userLevel"
|
binding.profileUserName.text = "${user.name} $userLevel"
|
||||||
binding.profileUserEpisodesWatched.text = user.statistics.anime.episodesWatched.toString()
|
if (!(PrefManager.getVal(PrefName.BannerAnimations) as Boolean)) binding.profileBannerImage.pause()
|
||||||
binding.profileUserChaptersRead.text = user.statistics.manga.chaptersRead.toString()
|
|
||||||
|
|
||||||
binding.profileBannerImage.loadImage(user.bannerImage)
|
binding.profileBannerImage.loadImage(user.bannerImage)
|
||||||
|
binding.profileBannerImage.updateLayoutParams { height += statusBarHeight }
|
||||||
binding.profileBannerImage.setOnLongClickListener {
|
binding.profileBannerImage.setOnLongClickListener {
|
||||||
ImageViewDialog.newInstance(
|
ImageViewDialog.newInstance(
|
||||||
this@ProfileActivity,
|
this@ProfileActivity,
|
||||||
|
@ -104,8 +123,8 @@ class ProfileActivity : AppCompatActivity(){
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
if (this::tabLayout.isInitialized) {
|
if (this::navBar.isInitialized) {
|
||||||
tabLayout.selectTabAt(selected)
|
navBar.selectTabAt(selected)
|
||||||
}
|
}
|
||||||
super.onResume()
|
super.onResume()
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,9 @@ class ProfileFragment(private val user: Query.UserProfile, private val activity:
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
val markwon = buildMarkwon(activity, false)
|
val markwon = buildMarkwon(activity, false)
|
||||||
markwon.setMarkdown(binding.profileUserInfo, user.about?:"")
|
markwon.setMarkdown(binding.profileUserBio, user.about?:"")
|
||||||
|
binding.userInfoContainer.visibility = if (user.about != null) View.VISIBLE else View.GONE
|
||||||
|
|
||||||
binding.profileAnimeList.setOnClickListener {
|
binding.profileAnimeList.setOnClickListener {
|
||||||
ContextCompat.startActivity(
|
ContextCompat.startActivity(
|
||||||
activity, Intent(activity, ListActivity::class.java)
|
activity, Intent(activity, ListActivity::class.java)
|
||||||
|
@ -46,5 +48,15 @@ class ProfileFragment(private val user: Query.UserProfile, private val activity:
|
||||||
}
|
}
|
||||||
binding.profileAnimeListImage.loadImage("https://bit.ly/31bsIHq")
|
binding.profileAnimeListImage.loadImage("https://bit.ly/31bsIHq")
|
||||||
binding.profileMangaListImage.loadImage("https://bit.ly/2ZGfcuG")
|
binding.profileMangaListImage.loadImage("https://bit.ly/2ZGfcuG")
|
||||||
|
binding.statsEpisodesWatched.text = user.statistics.anime.episodesWatched.toString()
|
||||||
|
binding.statsDaysWatched.text = (user.statistics.anime.minutesWatched / (24 * 60)).toString()
|
||||||
|
binding.statsTotalAnime.text = user.statistics.anime.count.toString()
|
||||||
|
binding.statsAnimeMeanScore.text = user.statistics.anime.meanScore.toString()
|
||||||
|
binding.statsChaptersRead.text = user.statistics.manga.chaptersRead.toString()
|
||||||
|
binding.statsVolumeRead.text = (user.statistics.manga.volumesRead).toString()
|
||||||
|
binding.statsTotalManga.text = user.statistics.manga.count.toString()
|
||||||
|
binding.statsMangaMeanScore.text = user.statistics.manga.meanScore.toString()
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -135,7 +135,7 @@ class StatsFragment(private val user: Query.UserProfile, private val activity: P
|
||||||
val names: List<String> = if (anime) {
|
val names: List<String> = if (anime) {
|
||||||
stats?.data?.user?.statistics?.anime?.formats?.map { it.format } ?: emptyList()
|
stats?.data?.user?.statistics?.anime?.formats?.map { it.format } ?: emptyList()
|
||||||
} else {
|
} else {
|
||||||
stats?.data?.user?.statistics?.manga?.formats?.map { it.format } ?: emptyList()
|
stats?.data?.user?.statistics?.manga?.countries?.map { it.country } ?: emptyList()
|
||||||
}
|
}
|
||||||
val values: List<Number> = if (anime) {
|
val values: List<Number> = if (anime) {
|
||||||
when (statType) {
|
when (statType) {
|
||||||
|
|
|
@ -28,24 +28,41 @@
|
||||||
android:id="@+id/profileTopContainer"
|
android:id="@+id/profileTopContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
<com.flaviofaria.kenburnsview.KenBurnsView
|
||||||
<ImageView
|
|
||||||
android:id="@+id/profileBannerImage"
|
android:id="@+id/profileBannerImage"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="180dp"
|
android:layout_height="200dp"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
android:src="@drawable/gradient_background"
|
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" />
|
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="40dp">
|
|
||||||
|
|
||||||
<com.google.android.material.imageview.ShapeableImageView
|
<com.google.android.material.imageview.ShapeableImageView
|
||||||
android:id="@+id/profileUserAvatar"
|
android:id="@+id/profileUserAvatar"
|
||||||
|
@ -53,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="-32dp"
|
|
||||||
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>
|
||||||
|
|
||||||
|
|
||||||
|
@ -141,7 +106,7 @@
|
||||||
|
|
||||||
|
|
||||||
<nl.joery.animatedbottombar.AnimatedBottomBar
|
<nl.joery.animatedbottombar.AnimatedBottomBar
|
||||||
android:id="@+id/typeTab"
|
android:id="@+id/profileNavBar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="72dp"
|
android:layout_height="72dp"
|
||||||
android:layout_gravity="center_horizontal|bottom"
|
android:layout_gravity="center_horizontal|bottom"
|
||||||
|
|
|
@ -6,18 +6,13 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/userListContainer"
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="18dp"
|
android:orientation="vertical">
|
||||||
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:id="@+id/profileListContainer"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
|
@ -133,24 +128,234 @@
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/userStatsContainer"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/profileUserStatsTitle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
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="Info"
|
android:text="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"
|
||||||
|
tools:ignore="HardcodedText">
|
||||||
|
|
||||||
|
<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="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="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="Total Anime"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/statsTotalAnime"
|
||||||
|
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="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="Chapter 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="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="Total Manga"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/statsTotalManga"
|
||||||
|
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="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="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"
|
android:textSize="18sp"
|
||||||
tools:ignore="HardcodedText" />
|
tools:ignore="HardcodedText" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/profileUserInfo"
|
android:id="@+id/profileUserBio"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:fontFamily="@font/poppins_semi_bold"
|
android:fontFamily="@font/poppins_semi_bold"
|
||||||
android:layout_marginStart="18dp"
|
android:paddingStart="32dp"
|
||||||
android:layout_marginEnd="18dp"
|
android:paddingTop="16dp"
|
||||||
android:text="info"
|
android:paddingEnd="32dp"
|
||||||
android:alpha="0.58"
|
android:alpha="0.58"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp"
|
||||||
|
tools:text="@tools:sample/lorem"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
Loading…
Add table
Add a link
Reference in a new issue