主播卡片UI修改
This commit is contained in:
@@ -6,8 +6,6 @@ import android.animation.ObjectAnimator
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.media.AudioAttributes
|
||||
import android.os.Build
|
||||
import android.os.SystemClock
|
||||
import android.os.Vibrator
|
||||
import android.text.TextUtils
|
||||
import android.util.AttributeSet
|
||||
@@ -15,6 +13,7 @@ import android.view.LayoutInflater
|
||||
import android.view.MotionEvent
|
||||
import android.widget.FrameLayout
|
||||
import android.widget.ImageView
|
||||
import androidx.core.view.isGone
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
@@ -94,6 +93,7 @@ class AnchorCardView @JvmOverloads constructor(
|
||||
}
|
||||
binding.tvNick.text = it.nick.subAndReplaceDot(7)
|
||||
binding.tvSignature.text = it.userDesc
|
||||
binding.tvSignature.isGone = it.userDesc.isNullOrEmpty()
|
||||
if (it.gender == UserInfo.GENDER_MALE) {
|
||||
binding.ivGender.setImageResource(R.drawable.ic_gender_male)
|
||||
} else {
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 32 KiB |
@@ -119,10 +119,10 @@
|
||||
android:id="@+id/vs_anchor_card"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="42dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout="@layout/layout_vs_anchor_card_view"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintDimensionRatio="750:220"
|
||||
app:layout_constraintDimensionRatio="750:244"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
@@ -10,7 +10,7 @@
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/bg_anchor_card"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="750:220"
|
||||
app:layout_constraintDimensionRatio="750:244"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -20,10 +20,11 @@
|
||||
android:layout_width="66dp"
|
||||
android:layout_height="66dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:src="@drawable/default_avatar"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.45" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_gender"
|
||||
@@ -40,6 +41,7 @@
|
||||
android:layout_marginStart="8dp"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_signature"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_avatar"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_avatar"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
@@ -62,10 +64,11 @@
|
||||
android:id="@+id/tv_signature"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="27dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="start"
|
||||
android:lines="1"
|
||||
android:ellipsize="end"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toTopOf="@id/ll_audio"
|
||||
@@ -78,6 +81,7 @@
|
||||
android:id="@+id/ll_audio"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"
|
||||
@@ -110,6 +114,7 @@
|
||||
android:layout_width="79dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:background="@drawable/bg_common_confirm"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
@@ -123,7 +128,7 @@
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@drawable/shape_anchor_card_time"
|
||||
android:gravity="center"
|
||||
|
@@ -8,7 +8,7 @@ data class AnchorInfo(
|
||||
val erbanNo: Int = 0,
|
||||
val gender: Int = 0,
|
||||
val nick: String = "",
|
||||
val userDesc: String = "",
|
||||
val userDesc: String? = null,
|
||||
val uid: Long = 0,
|
||||
val voiceCard: UserInfoSkillEntity? = null
|
||||
)
|
Reference in New Issue
Block a user