feat: 更新 UI

This commit is contained in:
eggmanQQQ
2024-08-28 17:36:16 +08:00
parent 9ff48bc500
commit 6aabeb3eb3
42 changed files with 92 additions and 37 deletions

View File

@@ -54,6 +54,11 @@ class VipCenterBannerAdapter(
val result = "${getString(R.string.vip_center_2)}$formattedDate"
holder.dueText.text = result
holder.dueText.visibility = View.VISIBLE
} else if (it.vipLevel < data.vipLevel) {
holder.dueText.text = getString(R.string.vip_center_8)
holder.dueText.visibility = View.VISIBLE
} else {
holder.dueText.visibility = View.GONE
}
}
@@ -73,7 +78,6 @@ class VipCenterBannerAdapter(
8-> holder.dueText.setTextColor(context.resources.getColor(R.color.color_4D1C1C))
}
// holder.svgaImage.loadFromUrl(data.vipLogo)
holder.vapAnimView.setScaleType(ScaleType.FIT_XY)
holder.vapAnimView.setLoop(Int.MAX_VALUE)
holder.vapAnimView.setAnimListener(object : IAnimListener {
@@ -104,14 +108,11 @@ class VipCenterBannerAdapter(
download(request, object : FileDownloadListener() {
override fun onDownloadCompleted(task: DownloadTask) {
val path = task.getRequest().getPath()
// log("drawVAPEffect onDownloadCompleted url:$url path:$path")
holder.vapAnimView.startPlay(File(path))
}
override fun onDownloadError(exception: DownloadException) {
// log("drawVAPEffect onDownloadError url:$url")
exception.printStackTrace()
// effectHandler.sendEmptyMessageDelayed(0, 4000)
}
})
}

View File

@@ -35,15 +35,22 @@ class VipCenterIdentificationsAdapter(
holder: VipCenterIdentificationsAdapter.ItemViewHolder,
position: Int
) {
var targetIndex = 0
when(position) {
0 -> targetIndex = 0
1 -> targetIndex = 1
2 -> targetIndex = 4
3 -> targetIndex = 7
4 -> targetIndex = 11
// var targetIndex = 0
// when(position) {
// 0 -> targetIndex = 0
// 1 -> targetIndex = 1
// 2 -> targetIndex = 4
// 3 -> targetIndex = 7
// 4 -> targetIndex = 11
// }
val filteredList = items.filter {
it.authType == 1 || it.authType == 5 || it.authType == 8 || it.authType ==
11 || it.authType == 12
}
val item = items[targetIndex]
val item = filteredList[position]
vipInfo?.let {
holder.titleTextView.text = item.authName

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 404 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -18,7 +18,7 @@
android:id="@+id/layout_bottom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_white_top_24dp"
android:background="@drawable/home_tab_bar_bg"
android:paddingBottom="@dimen/dp_10"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"

View File

@@ -11,7 +11,7 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="bottom|center_vertical"
android:gravity="bottom"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -24,11 +24,12 @@
android:id="@+id/img_background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/vip_center_level_1"
android:layout_gravity="start|bottom"
android:layout_marginStart="@dimen/dp_0"
android:layout_marginEnd="@dimen/dp_0"
android:layout_marginBottom="@dimen/dp_0"
android:layout_marginStart="@dimen/dp_0"
android:layout_gravity="start|bottom"
android:scaleType="fitEnd"
android:src="@drawable/vip_center_level_1"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="320:136"
app:layout_constraintEnd_toEndOf="parent"
@@ -41,7 +42,7 @@
android:layout_gravity="end|bottom"
app:layout_constraintBottom_toBottomOf="@id/img_background"
android:layout_marginEnd="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_35" />
android:layout_marginBottom="@dimen/dp_15" />
</FrameLayout>
<TextView
android:id="@+id/due_date_textview"

View File

@@ -13,7 +13,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/bg_theme_top"
android:src="@drawable/bg_theme_top_home"
app:layout_constraintTop_toTopOf="parent" />
<TextView

View File

@@ -4,15 +4,24 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_F7F7F7">
android:background="@color/color_FCF4DF">
<ImageView
android:id="@+id/topbg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/bg_theme_top_home"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:src="@drawable/bg_theme_top_center"
android:layout_marginTop="-20dp"
app:layout_constraintTop_toBottomOf="@id/topbg" />
<FrameLayout
android:id="@+id/layout_title_bar"
android:layout_width="match_parent"

View File

@@ -34,7 +34,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/bg_theme_top"
android:src="@drawable/bg_theme_top_home"
app:layout_constraintTop_toTopOf="parent" />
<!--个人信息-->

View File

@@ -759,4 +759,7 @@
<color name="color_1C4D35">#1C4D35</color>
<color name="color_4D371C">#4D371C</color>
<color name="color_4D1C1C">#4D1C1C</color>
<color name="color_FCF4DF">#FCF4DF</color>
</resources>

View File

@@ -4,9 +4,25 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_white"
android:background="@color/color_FCF4DF"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/topbg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/bg_theme_top_home"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:src="@drawable/bg_theme_top_center"
android:layout_marginTop="-20dp"
app:layout_constraintTop_toBottomOf="@id/topbg" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"

View File

@@ -4,7 +4,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="true"
android:background="@color/white"
android:background="@color/transparent"
android:focusableInTouchMode="true">
<com.chwl.app.common.widget.StatusLayout
@@ -14,6 +14,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:background="@color/transparent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="15dp"

View File

@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:background="@color/transparent"
android:orientation="vertical"
android:paddingBottom="@dimen/dp_8">

View File

@@ -94,7 +94,7 @@ class GameHomeFragment : BaseViewBindingFragment<GameHomeFragmentBinding>(), Mai
}
private fun loadGameInfo(config: GameConfigBean) {
binding.ivGameLogo.load(config.pic)
// binding.ivGameLogo.load(config.pic)
adapter.setNewData(config.gameModes)
}
@Subscribe(threadMode = ThreadMode.MAIN)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -2,8 +2,8 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/dp_18" />
<solid android:color="#BFFCFF" />
<solid android:color="#FAF6D3" />
<stroke
android:width="@dimen/dp_0_5"
android:color="#6EF2F9" />
android:color="#FFE358" />
</shape>

View File

@@ -4,7 +4,23 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/game_home_bg">
android:background="@color/color_FCF4DF">
<ImageView
android:id="@+id/topbg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/bg_theme_top_home"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:src="@drawable/bg_theme_top_center"
android:layout_marginTop="-20dp"
app:layout_constraintTop_toBottomOf="@id/topbg" />
<Space
android:id="@+id/space_title_bar"
@@ -24,15 +40,15 @@
app:layout_constraintTop_toTopOf="@id/space_title_bar"
app:shapeAppearance="@style/shape_circle" />
<ImageView
android:id="@+id/iv_avatar_border"
android:layout_width="@dimen/dp_37"
android:layout_height="@dimen/dp_37"
android:src="@drawable/game_home_ic_avatar_border"
app:layout_constraintBottom_toBottomOf="@id/iv_avatar"
app:layout_constraintEnd_toEndOf="@id/iv_avatar"
app:layout_constraintStart_toStartOf="@id/iv_avatar"
app:layout_constraintTop_toTopOf="@id/iv_avatar" />
<!-- <ImageView-->
<!-- android:id="@+id/iv_avatar_border"-->
<!-- android:layout_width="@dimen/dp_37"-->
<!-- android:layout_height="@dimen/dp_37"-->
<!-- android:src="@drawable/game_home_ic_avatar_border"-->
<!-- app:layout_constraintBottom_toBottomOf="@id/iv_avatar"-->
<!-- app:layout_constraintEnd_toEndOf="@id/iv_avatar"-->
<!-- app:layout_constraintStart_toStartOf="@id/iv_avatar"-->
<!-- app:layout_constraintTop_toTopOf="@id/iv_avatar" />-->
<LinearLayout
android:id="@+id/layout_wallet"
@@ -116,6 +132,7 @@
android:layout_width="0dp"
android:layout_height="0dp"
android:scaleType="centerCrop"
android:src="@drawable/ludo_game_logo"
app:layout_constraintDimensionRatio="141.5:113"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"