feat:恢复房间顶部排行榜入口:游戏房显示一个,其他房间三个
This commit is contained in:
@@ -8,6 +8,7 @@ import android.view.View
|
|||||||
import android.view.ViewConfiguration
|
import android.view.ViewConfiguration
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
|
import androidx.core.view.isVisible
|
||||||
import androidx.databinding.DataBindingUtil
|
import androidx.databinding.DataBindingUtil
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
@@ -429,6 +430,8 @@ class HomePartyFragment : BaseFragment(), View.OnClickListener, OnShareDialogIte
|
|||||||
setIdOnlineData()
|
setIdOnlineData()
|
||||||
if (isShowChangeGame) {
|
if (isShowChangeGame) {
|
||||||
initRvGame()
|
initRvGame()
|
||||||
|
binding.layoutRankTop1.isVisible = false
|
||||||
|
binding.layoutRankTop2.isVisible = false
|
||||||
binding.llChangeGame.visibility = View.VISIBLE
|
binding.llChangeGame.visibility = View.VISIBLE
|
||||||
if (AvRoomDataManager.get().isOpenGame) {
|
if (AvRoomDataManager.get().isOpenGame) {
|
||||||
binding.tvCurrGame.text = it.mgName
|
binding.tvCurrGame.text = it.mgName
|
||||||
@@ -454,6 +457,8 @@ class HomePartyFragment : BaseFragment(), View.OnClickListener, OnShareDialogIte
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
binding.llChangeGame.setVisibility(View.GONE)
|
binding.llChangeGame.setVisibility(View.GONE)
|
||||||
|
binding.layoutRankTop1.isVisible = true
|
||||||
|
binding.layoutRankTop2.isVisible = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -554,8 +559,8 @@ class HomePartyFragment : BaseFragment(), View.OnClickListener, OnShareDialogIte
|
|||||||
var imageView: ImageView
|
var imageView: ImageView
|
||||||
val avatarList = listOf(
|
val avatarList = listOf(
|
||||||
binding.ivRank0,
|
binding.ivRank0,
|
||||||
// binding.ivRank1,
|
binding.ivRank1,
|
||||||
// binding.ivRank2
|
binding.ivRank2
|
||||||
)
|
)
|
||||||
for (i in avatarList.indices) {
|
for (i in avatarList.indices) {
|
||||||
imageView = avatarList[i]
|
imageView = avatarList[i]
|
||||||
|
@@ -234,6 +234,7 @@
|
|||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
|
android:id="@+id/layout_rank_top_0"
|
||||||
android:layout_width="29dp"
|
android:layout_width="29dp"
|
||||||
android:layout_height="35dp">
|
android:layout_height="35dp">
|
||||||
|
|
||||||
@@ -265,76 +266,79 @@
|
|||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/layout_rank_top_1"
|
||||||
|
android:layout_width="29dp"
|
||||||
|
android:layout_height="35dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
<!-- <FrameLayout-->
|
<ImageView
|
||||||
<!-- android:layout_width="29dp"-->
|
android:id="@+id/iv_rank_1"
|
||||||
<!-- android:layout_height="35dp">-->
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_gravity="bottom|end"
|
||||||
|
android:layout_marginBottom="2dp"
|
||||||
|
android:src="@drawable/default_avatar" />
|
||||||
|
|
||||||
<!-- <ImageView-->
|
<View
|
||||||
<!-- android:id="@+id/iv_rank_1"-->
|
android:layout_width="29dp"
|
||||||
<!-- android:layout_width="24dp"-->
|
android:layout_height="33dp"
|
||||||
<!-- android:layout_height="24dp"-->
|
android:background="@drawable/ic_room_rank1" />
|
||||||
<!-- android:layout_gravity="bottom|end"-->
|
|
||||||
<!-- android:layout_marginBottom="2dp"-->
|
|
||||||
<!-- android:src="@drawable/default_avatar" />-->
|
|
||||||
|
|
||||||
<!-- <View-->
|
<com.coorchice.library.SuperTextView
|
||||||
<!-- android:layout_width="29dp"-->
|
android:id="@+id/stv_rank1"
|
||||||
<!-- android:layout_height="33dp"-->
|
android:layout_width="22dp"
|
||||||
<!-- android:background="@drawable/ic_room_rank1" />-->
|
android:layout_height="8dp"
|
||||||
|
android:layout_gravity="bottom|end"
|
||||||
|
android:gravity="center"
|
||||||
|
android:includeFontPadding="false"
|
||||||
|
android:text="0"
|
||||||
|
android:textColor="#2E527A"
|
||||||
|
android:textSize="7dp"
|
||||||
|
app:corner="10dp"
|
||||||
|
app:solid="#91C8FA" />
|
||||||
|
|
||||||
<!-- <com.coorchice.library.SuperTextView-->
|
</FrameLayout>
|
||||||
<!-- android:id="@+id/stv_rank1"-->
|
|
||||||
<!-- android:layout_width="22dp"-->
|
|
||||||
<!-- android:layout_height="8dp"-->
|
|
||||||
<!-- android:layout_gravity="bottom|end"-->
|
|
||||||
<!-- android:gravity="center"-->
|
|
||||||
<!-- android:includeFontPadding="false"-->
|
|
||||||
<!-- android:text="0"-->
|
|
||||||
<!-- android:textColor="#2E527A"-->
|
|
||||||
<!-- android:textSize="7dp"-->
|
|
||||||
<!-- app:corner="10dp"-->
|
|
||||||
<!-- app:solid="#91C8FA" />-->
|
|
||||||
|
|
||||||
<!-- </FrameLayout>-->
|
<FrameLayout
|
||||||
|
android:id="@+id/layout_rank_top_2"
|
||||||
|
android:layout_width="29dp"
|
||||||
|
android:layout_height="35dp"
|
||||||
|
android:layout_marginEnd="5dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
<!-- <FrameLayout-->
|
<ImageView
|
||||||
<!-- android:layout_width="29dp"-->
|
android:id="@+id/iv_rank_2"
|
||||||
<!-- android:layout_height="35dp"-->
|
android:layout_width="24dp"
|
||||||
<!-- android:layout_marginEnd="5dp">-->
|
android:layout_height="24dp"
|
||||||
|
android:layout_gravity="bottom|end"
|
||||||
|
android:layout_marginBottom="2dp"
|
||||||
|
android:src="@drawable/default_avatar" />
|
||||||
|
|
||||||
<!-- <ImageView-->
|
<View
|
||||||
<!-- android:id="@+id/iv_rank_2"-->
|
android:layout_width="29dp"
|
||||||
<!-- android:layout_width="24dp"-->
|
android:layout_height="33dp"
|
||||||
<!-- android:layout_height="24dp"-->
|
android:background="@drawable/ic_room_rank2" />
|
||||||
<!-- android:layout_gravity="bottom|end"-->
|
|
||||||
<!-- android:layout_marginBottom="2dp"-->
|
|
||||||
<!-- android:src="@drawable/default_avatar" />-->
|
|
||||||
|
|
||||||
<!-- <View-->
|
<com.coorchice.library.SuperTextView
|
||||||
<!-- android:layout_width="29dp"-->
|
android:id="@+id/stv_rank2"
|
||||||
<!-- android:layout_height="33dp"-->
|
android:layout_width="22dp"
|
||||||
<!-- android:background="@drawable/ic_room_rank2" />-->
|
android:layout_height="8dp"
|
||||||
|
android:layout_gravity="bottom|end"
|
||||||
<!-- <com.coorchice.library.SuperTextView-->
|
android:gravity="center"
|
||||||
<!-- android:id="@+id/stv_rank2"-->
|
android:includeFontPadding="false"
|
||||||
<!-- android:layout_width="22dp"-->
|
android:text="0"
|
||||||
<!-- android:layout_height="8dp"-->
|
android:textColor="#824B2C"
|
||||||
<!-- android:layout_gravity="bottom|end"-->
|
android:textSize="7dp"
|
||||||
<!-- android:gravity="center"-->
|
app:corner="10dp"
|
||||||
<!-- android:includeFontPadding="false"-->
|
app:solid="#F0A47B" />
|
||||||
<!-- android:text="0"-->
|
|
||||||
<!-- android:textColor="#824B2C"-->
|
|
||||||
<!-- android:textSize="7dp"-->
|
|
||||||
<!-- app:corner="10dp"-->
|
|
||||||
<!-- app:solid="#F0A47B" />-->
|
|
||||||
|
|
||||||
<!-- </FrameLayout>-->
|
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/room_more"
|
android:id="@+id/room_more"
|
||||||
android:layout_width="25dp"
|
android:layout_width="25dp"
|
||||||
|
Reference in New Issue
Block a user