UI 优化。
This commit is contained in:
@@ -84,14 +84,15 @@ class RoomPubFragment(var mRoomInfoResp: RoomInfoResp?) :
|
||||
timer.timeLeft.collect { time ->
|
||||
viewList.forEach { it ->
|
||||
if (it.pitNumber != "9" && it.pitNumber != "10") {
|
||||
if (!TextUtils.isEmpty(it.pitBean.user_id) && !it.pitBean.user_id.equals("0")) {
|
||||
val time =
|
||||
it.pitBean.end_time.toLong() * 1000 - System.currentTimeMillis()
|
||||
if (!TextUtils.isEmpty(it.pitBean.user_id) && !it.pitBean.user_id.equals("0") && !TextUtils.isEmpty(it.pitBean.end_time)) {
|
||||
val time = it.pitBean.end_time.toLong() * 1000 - System.currentTimeMillis()
|
||||
if (time <= 0) {
|
||||
it.setTime("00:00")
|
||||
} else {
|
||||
it.setTime(timer.formatTime2(time))
|
||||
}
|
||||
} else {
|
||||
it.setTime("00:00")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -123,6 +124,7 @@ class RoomPubFragment(var mRoomInfoResp: RoomInfoResp?) :
|
||||
for ((idx, view) in viewList.withIndex()) {
|
||||
if (mRoomInfoResp?.room_info?.pit_list!!.size > indexList[idx].toInt() - 1) {
|
||||
view.setRoomWheatNumber(indexList[idx])
|
||||
view.isMentorShip(true)
|
||||
val bean = mRoomInfoResp?.room_info?.pit_list!![indexList[idx].toInt() - 1]
|
||||
view.setData(bean)
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.7" />
|
||||
app:layout_constraintGuide_percent="0.65" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guide_line_right"
|
||||
@@ -79,7 +79,7 @@
|
||||
android:layout_width="@dimen/dp_140"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintDimensionRatio="1:0.68"
|
||||
app:layout_constraintDimensionRatio="1:0.7"
|
||||
app:layout_constraintStart_toStartOf="@id/guide_line_left_2"
|
||||
app:layout_constraintEnd_toEndOf="@id/guide_line_left_2"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -89,7 +89,7 @@
|
||||
android:layout_width="@dimen/dp_140"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintDimensionRatio="1:0.68"
|
||||
app:layout_constraintDimensionRatio="1:0.7"
|
||||
app:layout_constraintStart_toStartOf="@id/guide_line_right_2"
|
||||
app:layout_constraintEnd_toEndOf="@id/guide_line_right_2"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -107,7 +107,7 @@
|
||||
android:id="@+id/rpwv_1"
|
||||
android:layout_width="@dimen/dp_140"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintDimensionRatio="1:0.68"
|
||||
app:layout_constraintDimensionRatio="1:0.7"
|
||||
app:layout_constraintEnd_toEndOf="@id/guide_line_left"
|
||||
app:layout_constraintStart_toStartOf="@id/guide_line_left"
|
||||
app:layout_constraintTop_toTopOf="@id/guide_line_content_top" />
|
||||
@@ -118,7 +118,7 @@
|
||||
android:layout_width="@dimen/dp_140"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintDimensionRatio="1:0.68"
|
||||
app:layout_constraintDimensionRatio="1:0.7"
|
||||
app:layout_constraintEnd_toEndOf="@id/guide_line_left"
|
||||
app:layout_constraintStart_toStartOf="@id/guide_line_left"
|
||||
app:layout_constraintTop_toBottomOf="@id/rpwv_1" />
|
||||
@@ -128,7 +128,7 @@
|
||||
android:id="@+id/rpwv_2"
|
||||
android:layout_width="@dimen/dp_140"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintDimensionRatio="1:0.68"
|
||||
app:layout_constraintDimensionRatio="1:0.7"
|
||||
app:layout_constraintEnd_toEndOf="@id/guide_line_midd"
|
||||
app:layout_constraintStart_toStartOf="@id/guide_line_midd"
|
||||
app:layout_constraintTop_toTopOf="@id/guide_line_content_top" />
|
||||
@@ -139,7 +139,7 @@
|
||||
android:layout_width="@dimen/dp_140"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintDimensionRatio="1:0.68"
|
||||
app:layout_constraintDimensionRatio="1:0.7"
|
||||
app:layout_constraintEnd_toEndOf="@id/guide_line_midd"
|
||||
app:layout_constraintStart_toStartOf="@id/guide_line_midd"
|
||||
app:layout_constraintTop_toBottomOf="@id/rpwv_2" />
|
||||
@@ -149,7 +149,7 @@
|
||||
android:id="@+id/rpwv_3"
|
||||
android:layout_width="@dimen/dp_140"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintDimensionRatio="1:0.68"
|
||||
app:layout_constraintDimensionRatio="1:0.7"
|
||||
app:layout_constraintEnd_toEndOf="@id/guide_line_right"
|
||||
app:layout_constraintStart_toStartOf="@id/guide_line_right"
|
||||
app:layout_constraintTop_toTopOf="@id/guide_line_content_top" />
|
||||
@@ -160,7 +160,7 @@
|
||||
android:layout_width="@dimen/dp_140"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintDimensionRatio="1:0.68"
|
||||
app:layout_constraintDimensionRatio="1:0.7"
|
||||
app:layout_constraintEnd_toEndOf="@id/guide_line_right"
|
||||
app:layout_constraintStart_toStartOf="@id/guide_line_right"
|
||||
app:layout_constraintTop_toBottomOf="@id/rpwv_3" />
|
||||
|
||||
Reference in New Issue
Block a user