라이브 유저 프로필 다이얼로그

- 크리에이터가 아닌 일반 유저는 태그 영역과 소개 영역이 보이지 않도록 제거
This commit is contained in:
klaus 2023-11-22 23:51:26 +09:00
parent 61ee1fc5be
commit f4ca63af9d
2 changed files with 35 additions and 56 deletions

View File

@ -83,12 +83,8 @@ class LiveRoomUserProfileDialog(
}
dialogView.tvNickname.text = userProfile.nickname
dialogView.tvTags.text = userProfile.tags
dialogView.tvGender.text = userProfile.gender
dialogView.tvIntroduce.text = userProfile.introduce
dialogView.ivClose.setOnClickListener { alertDialog.dismiss() }
dialogView.tvIntroduce.setOnClickListener {
isIntroduceFold = !isIntroduceFold
@ -162,25 +158,32 @@ class LiveRoomUserProfileDialog(
}
if (userProfile.isFollowing != null) {
dialogView.llFollow.visibility = View.VISIBLE
dialogView.ivFollow.visibility = View.VISIBLE
if (userProfile.isFollowing) {
dialogView.tvFollow.text = "팔로잉"
dialogView.ivFollow.setImageResource(R.drawable.ic_alarm_selected)
dialogView.llFollow.setBackgroundResource(
R.drawable.bg_round_corner_23_3_3e1b93_9970ff
)
dialogView.tvFollow.setOnClickListener { onClickUnFollow(userProfile.userId) }
dialogView.ivFollow.setImageResource(R.drawable.btn_following)
dialogView.ivFollow.setOnClickListener { onClickUnFollow(userProfile.userId) }
} else {
dialogView.tvFollow.text = "팔로우"
dialogView.ivFollow.setImageResource(R.drawable.ic_alarm)
dialogView.llFollow.setBackgroundResource(
R.drawable.bg_round_corner_23_3_transparent_9970ff
)
dialogView.tvFollow.setOnClickListener { onClickFollow(userProfile.userId) }
dialogView.ivFollow.setImageResource(R.drawable.btn_follow)
dialogView.ivFollow.setOnClickListener { onClickFollow(userProfile.userId) }
}
if (userProfile.tags.isNotBlank()) {
dialogView.tvTags.text = userProfile.tags
dialogView.tvTags.visibility = View.VISIBLE
} else {
dialogView.tvTags.visibility = View.GONE
}
if (userProfile.introduce.isNotBlank()) {
dialogView.tvIntroduce.text = userProfile.introduce
dialogView.tvIntroduce.visibility = View.VISIBLE
} else {
dialogView.tvIntroduce.visibility = View.GONE
}
} else {
dialogView.llFollow.visibility = View.GONE
dialogView.ivFollow.visibility = View.GONE
dialogView.tvIntroduce.visibility = View.GONE
}
dialogView.ivMenu.setOnClickListener {

View File

@ -2,15 +2,13 @@
<LinearLayout 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"
android:layout_height="wrap_content"
android:background="@drawable/bg_round_corner_8_222222"
android:paddingTop="13.3dp"
android:paddingBottom="20dp"
android:layout_gravity="center_vertical"
android:orientation="vertical">
<FrameLayout
android:id="@+id/fl_ad"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<RelativeLayout
android:id="@+id/rl_title"
android:layout_width="match_parent"
@ -77,6 +75,14 @@
android:textColor="@color/white"
android:textSize="11.3sp"
tools:text="여" />
<ImageView
android:id="@+id/iv_follow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="13.3dp"
android:contentDescription="@null"
tools:src="@drawable/btn_follow" />
</LinearLayout>
<ImageView
@ -90,37 +96,6 @@
android:src="@drawable/ic_seemore_vertical" />
</RelativeLayout>
<LinearLayout
android:id="@+id/ll_follow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="21.3dp"
android:background="@drawable/bg_round_corner_23_3_transparent_9970ff"
android:baselineAligned="false"
android:gravity="center"
android:orientation="horizontal"
android:paddingVertical="7.3dp"
tools:ignore="UseCompoundDrawables">
<ImageView
android:id="@+id/iv_follow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="4dp"
android:contentDescription="@null"
tools:src="@drawable/ic_alarm" />
<TextView
android:id="@+id/tv_follow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/gmarket_sans_bold"
android:gravity="center"
android:textColor="@color/white"
android:textSize="12sp"
tools:text="팔로우" />
</LinearLayout>
<ImageView
android:id="@+id/iv_profile"
android:layout_width="wrap_content"
@ -196,6 +171,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="21.3dp"
android:visibility="gone"
android:fontFamily="@font/gmarket_sans_medium"
android:textColor="@color/color_9970ff"
android:textSize="13.3sp"
@ -206,8 +182,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="18.7dp"
android:layout_marginBottom="20dp"
android:ellipsize="end"
android:visibility="gone"
android:maxLines="2"
android:textColor="@color/color_909090"
android:textSize="12sp"