fix:修复房间玩法资源位样式问题(滚动条| 背景色)

This commit is contained in:
Max
2024-02-23 16:35:43 +08:00
parent 7a677c96cd
commit 13106a62e4
6 changed files with 49 additions and 5 deletions

View File

@@ -0,0 +1,25 @@
package com.yizhuan.erban.avroom.gameplay
import android.content.Context
import android.util.AttributeSet
import android.view.MotionEvent
import androidx.recyclerview.widget.RecyclerView
/**
* Created by Max on 2024/2/23 16:09
* Desc:
**/
class GameplayRecyclerView : RecyclerView {
constructor(context: Context) : super(context)
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs)
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(
context,
attrs,
defStyleAttr
)
override fun onInterceptTouchEvent(e: MotionEvent?): Boolean {
parent.requestDisallowInterceptTouchEvent(true)
return super.onInterceptTouchEvent(e)
}
}

View File

@@ -57,5 +57,6 @@ class RoomGameplayListWidget : FrameLayoutRoomWidget {
fun loadData(list: List<RoomIcon>) {
adapter.setNewData(list)
binding.recyclerView.isScrollbarFadingEnabled = list.size <= 6
}
}

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#4D4D4D" />
<corners android:radius="8dp" />
</shape>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#99727272" />
<corners android:radius="@dimen/dp_7" />
</shape>

View File

@@ -4,7 +4,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_4"
android:background="@drawable/shape_727272_7dp">
android:background="@drawable/shape_99727272_7dp">
<ImageView
android:id="@+id/iv_icon"

View File

@@ -23,21 +23,26 @@
android:id="@+id/blur_view_icon"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:realtimeBlurRadius="25dp"
app:realtimeBlurRadius="15dp"
app:realtimeDownsampleFactor="4"
app:realtimeOverlayColor="#80000000" />
app:realtimeOverlayColor="#50000000" />
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/room_gameplay_bg" />
<androidx.recyclerview.widget.RecyclerView
<com.yizhuan.erban.avroom.gameplay.GameplayRecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="@dimen/dp_4"
android:layout_marginVertical="@dimen/dp_4"
android:orientation="vertical"
android:paddingHorizontal="@dimen/dp_4"
android:scrollbarSize="3dp"
android:scrollbarStyle="outsideOverlay"
android:scrollbarThumbVertical="@drawable/room_gameplay_bg_scrollbar_thumb"
android:scrollbars="vertical"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:spanCount="3" />