feat : 修复bug

This commit is contained in:
eggmanQQQ
2025-01-08 17:48:01 +08:00
parent 2e305164e8
commit 5f6db6285e
3 changed files with 16 additions and 8 deletions

View File

@@ -137,7 +137,7 @@ class RoomTypeSwitchActivity : BaseViewBindingActivity<RoomTypeSwitchActivityBin
binding.avatar.load(mCurrentRoomInfo?.avatar)
binding.nick.text = mCurrentRoomInfo?.title
binding.levelIcon.load(it.getCurrentLevelIcon())
binding.roomValue.text = R.string.Room_Value_s.getString(it.roomVal.toInt().toString())
binding.roomValue.text = R.string.Room_Value_s.getString(it.roomVal.toLong().toString())
binding.roomAdmin.text = R.string.Room_Admin_s.getString(it.currentManagerNum,it.managerLimitNum)
binding.currentLevel.text = R.string.LV_s.getString(it.currentLevel)
binding.nextLevel.text = R.string.LV_s.getString(it.nextLevel)

View File

@@ -149,6 +149,10 @@ class GiveGoldActivity : BaseViewBindingActivity<ActivityGiveGoldBinding>() {
.doOnSuccess {
binding.starLayout.removeAllViews()
if (it != null) {
if (it.starLevel == -1) {
binding.userInfo.setVis(false)
return@doOnSuccess
}
for (i in 0 until 5) {
val star = ImageView(context)
star.setViewWH(15, 15)

View File

@@ -77,11 +77,13 @@
<com.chwl.library.widget.text.DrawableTextView
android:id="@+id/tv_room_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="@dimen/dp_21"
android:drawablePadding="2dp"
android:ellipsize="end"
android:maxLines="1"
android:paddingEnd="30dp"
android:maxWidth="200dp"
android:gravity="center_vertical"
android:paddingEnd="10dp"
android:textColor="@color/color_1E1E1F"
android:textSize="@dimen/sp_15"
android:textStyle="bold"
@@ -92,7 +94,7 @@
app:layout_constraintStart_toEndOf="@id/flag"
app:layout_constraintTop_toTopOf="@+id/iv_room_image"
app:layout_constraintVertical_chainStyle="packed"
tools:text="111" />
tools:text="11111111111111111111111111111111111111111" />
<View
android:id="@+id/tv_room_title_max"
@@ -100,13 +102,14 @@
android:layout_height="10dp"
android:ellipsize="end"
android:maxLines="1"
android:paddingEnd="30dp"
android:layout_marginStart="30dp"
android:layout_marginEnd="50dp"
android:textColor="@color/color_1E1E1F"
android:textSize="@dimen/sp_15"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@id/tv_desc"
app:layout_constraintEnd_toStartOf="@id/boomIcon"
app:layout_constraintStart_toEndOf="@id/flag"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/iv_room_image"
app:layout_constraintTop_toTopOf="@+id/iv_room_image" />
@@ -125,10 +128,11 @@
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_desc"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_height="@dimen/dp_18"
android:layout_marginStart="3dp"
android:layout_marginTop="6dp"
android:layout_marginEnd="4dp"
android:gravity="center_vertical"
android:ellipsize="end"
android:hint="@string/home_room_card_topic_empty_def"
android:includeFontPadding="false"