[Modify]修復1.6.0bug
This commit is contained in:
@@ -15,6 +15,7 @@ import android.view.View
|
||||
import android.view.WindowManager
|
||||
import android.widget.PopupWindow
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import com.android.billingclient.api.BillingClient
|
||||
import com.android.billingclient.api.BillingResult
|
||||
import com.android.billingclient.api.Purchase
|
||||
@@ -22,9 +23,6 @@ import com.android.billingclient.api.SkuDetails
|
||||
import com.appsflyer.AFInAppEventParameterName
|
||||
import com.appsflyer.AFInAppEventType
|
||||
import com.appsflyer.AppsFlyerLib
|
||||
import com.google.android.flexbox.AlignItems
|
||||
import com.google.android.flexbox.FlexboxLayoutManager
|
||||
import com.google.android.flexbox.JustifyContent
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil
|
||||
import com.umeng.commonsdk.statistics.common.DeviceConfig
|
||||
import com.yizhuan.erban.R
|
||||
@@ -32,14 +30,12 @@ import com.yizhuan.erban.base.BaseViewBindingActivity
|
||||
import com.yizhuan.erban.databinding.DialogFirstChargeBinding
|
||||
import com.yizhuan.erban.ui.pay.BillingManager
|
||||
import com.yizhuan.erban.ui.setting.ModifyPwdActivity
|
||||
import com.yizhuan.erban.ui.utils.RVDelegate
|
||||
import com.yizhuan.erban.ui.webview.CommonWebViewActivity
|
||||
import com.yizhuan.erban.ui.widget.magicindicator.buildins.UIUtil
|
||||
import com.yizhuan.xchat_android_core.Constants
|
||||
import com.yizhuan.xchat_android_core.UriProvider
|
||||
import com.yizhuan.xchat_android_core.pay.PayModel
|
||||
import com.yizhuan.xchat_android_core.pay.bean.FirstChargeGoods
|
||||
import com.yizhuan.xchat_android_core.pay.bean.FirstChargeReward
|
||||
import com.yizhuan.xchat_android_core.pay.bean.PayRecordId
|
||||
import com.yizhuan.xchat_android_core.pay.event.FirstChargeEvent
|
||||
import com.yizhuan.xchat_android_core.utils.net.IgnoreException
|
||||
@@ -62,12 +58,15 @@ class FirstChargeDialog : BaseViewBindingActivity<DialogFirstChargeBinding>(),
|
||||
private var goodsList: List<FirstChargeGoods>? = null
|
||||
|
||||
private var currGoods: FirstChargeGoods? = null
|
||||
private lateinit var rewardAdapter: RewardAdapter
|
||||
private lateinit var rvDelegate: RVDelegate<FirstChargeReward>
|
||||
|
||||
// private lateinit var rewardAdapter: RewardAdapter
|
||||
// private lateinit var rvDelegate: RVDelegate<FirstChargeReward>
|
||||
private lateinit var helpPopupWindow: PopupWindow
|
||||
private var billingManager: BillingManager? = null
|
||||
private var position = -1
|
||||
|
||||
private val mReward2Adapter by lazy { Reward2Adapter() }
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context) {
|
||||
@@ -133,17 +132,35 @@ class FirstChargeDialog : BaseViewBindingActivity<DialogFirstChargeBinding>(),
|
||||
}
|
||||
}
|
||||
|
||||
rvDelegate = RVDelegate.Builder<FirstChargeReward>()
|
||||
.setAdapter(
|
||||
RewardAdapter((ScreenUtil.screenWidth * 0.66f / 2f).toInt())
|
||||
.also { rewardAdapter = it }
|
||||
)
|
||||
.setLayoutManager(FlexboxLayoutManager(context).apply {
|
||||
alignItems = AlignItems.STRETCH
|
||||
justifyContent = JustifyContent.SPACE_EVENLY
|
||||
})
|
||||
.setRecyclerView(binding.recyclerView)
|
||||
.build()
|
||||
binding.recyclerView.layoutManager = GridLayoutManager(this, 6)
|
||||
//重新定义每行的item数量
|
||||
mReward2Adapter.setSpanSizeLookup { _, position ->
|
||||
val data = mReward2Adapter.data
|
||||
var spanSize = 0
|
||||
if (data[position].itemType == 1) {
|
||||
spanSize = 6
|
||||
} else if (data[position].itemType == 2) {
|
||||
spanSize = 3
|
||||
} else if (data[position].itemType == 3) {
|
||||
spanSize = 3
|
||||
} else if (data[position].itemType == 4) {
|
||||
spanSize = 2
|
||||
}
|
||||
spanSize
|
||||
}
|
||||
binding.recyclerView.adapter = mReward2Adapter
|
||||
|
||||
// rvDelegate = RVDelegate.Builder<FirstChargeReward>()
|
||||
// .setAdapter(
|
||||
// RewardAdapter((ScreenUtil.screenWidth * 0.66f / 2f).toInt())
|
||||
// .also { rewardAdapter = it }
|
||||
// )
|
||||
// .setLayoutManager(FlexboxLayoutManager(context).apply {
|
||||
// alignItems = AlignItems.STRETCH
|
||||
// justifyContent = JustifyContent.SPACE_EVENLY
|
||||
// })
|
||||
// .setRecyclerView(binding.recyclerView)
|
||||
// .build()
|
||||
dialogManager.showProgressDialog(this)
|
||||
PayModel.get().firstChargeList
|
||||
.compose(bindToLifecycle())
|
||||
@@ -345,7 +362,43 @@ class FirstChargeDialog : BaseViewBindingActivity<DialogFirstChargeBinding>(),
|
||||
)
|
||||
binding.tvTitle.text = builder
|
||||
}
|
||||
rewardAdapter.setNewData(it.firstChargeRewardList)
|
||||
val firstChargeRewardList = it.firstChargeRewardList ?: return
|
||||
if (firstChargeRewardList.size == 1) {
|
||||
for (bean in firstChargeRewardList) {
|
||||
bean.itemType = 1
|
||||
}
|
||||
} else if (firstChargeRewardList.size == 2) {
|
||||
for (i in firstChargeRewardList.indices) {
|
||||
if (i == 0) {
|
||||
firstChargeRewardList[i].itemType = 2
|
||||
} else if (i == 1) {
|
||||
firstChargeRewardList[i].itemType = 3
|
||||
}
|
||||
}
|
||||
} else if (firstChargeRewardList.size == 3) {
|
||||
for (bean in firstChargeRewardList) {
|
||||
bean.itemType = 4
|
||||
}
|
||||
} else if (firstChargeRewardList.size == 4) {
|
||||
for (i in firstChargeRewardList.indices) {
|
||||
if ((i + 1) % 2 != 0) {
|
||||
firstChargeRewardList[i].itemType = 2
|
||||
} else {
|
||||
firstChargeRewardList[i].itemType = 3
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (i in firstChargeRewardList.indices) {
|
||||
if (i == 3) {
|
||||
firstChargeRewardList[i].itemType = 2
|
||||
} else if (i == 4) {
|
||||
firstChargeRewardList[i].itemType = 3
|
||||
} else {
|
||||
firstChargeRewardList[i].itemType = 4
|
||||
}
|
||||
}
|
||||
}
|
||||
mReward2Adapter.setNewData(it.firstChargeRewardList)
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,43 @@
|
||||
package com.yizhuan.erban.avroom.firstcharge
|
||||
|
||||
import com.chad.library.adapter.base.BaseMultiItemQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtils
|
||||
import com.yizhuan.xchat_android_core.pay.bean.FirstChargeReward
|
||||
import com.yizhuan.xchat_android_core.utils.TextUtils
|
||||
|
||||
class Reward2Adapter : BaseMultiItemQuickAdapter<FirstChargeReward, BaseViewHolder>(null) {
|
||||
|
||||
init {
|
||||
addItemType(FirstChargeReward.ONE, R.layout.item_first_charge_reward_one)
|
||||
addItemType(FirstChargeReward.TWO, R.layout.item_first_charge_reward_two_left)
|
||||
addItemType(FirstChargeReward.THREE, R.layout.item_first_charge_reward_two_right)
|
||||
addItemType(FirstChargeReward.FOUR, R.layout.item_first_charge_reward_three)
|
||||
}
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: FirstChargeReward) {
|
||||
if (item.itemType == FirstChargeReward.ONE) {
|
||||
show(helper, item)
|
||||
} else if (item.itemType == FirstChargeReward.TWO) {
|
||||
show(helper, item)
|
||||
} else if (item.itemType == FirstChargeReward.THREE) {
|
||||
show(helper, item)
|
||||
} else if (item.itemType == FirstChargeReward.FOUR) {
|
||||
show(helper, item)
|
||||
}
|
||||
}
|
||||
|
||||
private fun show(helper: BaseViewHolder, item: FirstChargeReward) {
|
||||
ImageLoadUtils.loadImage(
|
||||
mContext,
|
||||
item.showPir,
|
||||
helper.getView(R.id.iv_pic),
|
||||
R.drawable.ic_first_charge_default
|
||||
)
|
||||
helper.setText(R.id.tv_name, item.showText)
|
||||
.setText(R.id.tv_time, item.showTime)
|
||||
.setGone(R.id.tv_time, !TextUtils.isEmptyText(item.showTime))
|
||||
}
|
||||
|
||||
}
|
@@ -100,6 +100,8 @@
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="@dimen/dp_6"
|
||||
android:layout_marginEnd="@dimen/dp_6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
|
83
app/src/main/res/layout/item_first_charge_reward_one.xml
Normal file
83
app/src/main/res/layout/item_first_charge_reward_one.xml
Normal file
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginBottom="6dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:background="@drawable/bg_first_charge_reward_item"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_pic"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="@dimen/dp_0"
|
||||
android:scaleType="fitCenter"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg"
|
||||
tools:src="@drawable/ic_first_charge_default" />
|
||||
|
||||
<com.coorchice.library.SuperTextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="2dp"
|
||||
android:paddingEnd="2dp"
|
||||
android:text="@string/layout_item_first_charge_reward_01"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_11"
|
||||
app:corner="4dp"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:layout_marginTop="2dp"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg"
|
||||
app:left_bottom_corner="false"
|
||||
app:left_top_corner="true"
|
||||
app:right_bottom_corner="true"
|
||||
app:right_top_corner="false"
|
||||
app:shaderEnable="true"
|
||||
app:shaderEndColor="#E98EF4"
|
||||
app:shaderMode="leftToRight"
|
||||
app:shaderStartColor="#E669F7" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:textColor="#7E26B0"
|
||||
android:textSize="@dimen/sp_13"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_bg"
|
||||
tools:text="@string/layout_item_first_charge_reward_02" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
85
app/src/main/res/layout/item_first_charge_reward_three.xml
Normal file
85
app/src/main/res/layout/item_first_charge_reward_three.xml
Normal file
@@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginBottom="6dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_6"
|
||||
android:layout_marginEnd="@dimen/dp_6"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="@dimen/dp_6"
|
||||
android:layout_marginStart="@dimen/dp_6"
|
||||
android:background="@drawable/bg_first_charge_reward_item"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_pic"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="@dimen/dp_0"
|
||||
android:scaleType="fitCenter"
|
||||
android:layout_marginStart="@dimen/dp_6"
|
||||
android:layout_marginEnd="@dimen/dp_6"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:layout_marginBottom="@dimen/dp_6"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg"
|
||||
tools:src="@drawable/ic_first_charge_default" />
|
||||
|
||||
<com.coorchice.library.SuperTextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="2dp"
|
||||
android:paddingEnd="2dp"
|
||||
android:text="@string/layout_item_first_charge_reward_01"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_11"
|
||||
app:corner="4dp"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:layout_marginTop="2dp"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg"
|
||||
app:left_bottom_corner="false"
|
||||
app:left_top_corner="true"
|
||||
app:right_bottom_corner="true"
|
||||
app:right_top_corner="false"
|
||||
app:shaderEnable="true"
|
||||
app:shaderEndColor="#E98EF4"
|
||||
app:shaderMode="leftToRight"
|
||||
app:shaderStartColor="#E669F7" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:textColor="#7E26B0"
|
||||
android:textSize="@dimen/sp_11"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_bg"
|
||||
tools:text="@string/layout_item_first_charge_reward_02" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginBottom="6dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="77dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="@dimen/dp_6"
|
||||
android:layout_marginStart="@dimen/dp_6"
|
||||
android:background="@drawable/bg_first_charge_reward_item"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_pic"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="@dimen/dp_0"
|
||||
android:scaleType="fitCenter"
|
||||
android:layout_marginStart="@dimen/dp_6"
|
||||
android:layout_marginEnd="@dimen/dp_6"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:layout_marginBottom="@dimen/dp_6"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg"
|
||||
tools:src="@drawable/ic_first_charge_default" />
|
||||
|
||||
<com.coorchice.library.SuperTextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="2dp"
|
||||
android:paddingEnd="2dp"
|
||||
android:text="@string/layout_item_first_charge_reward_01"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_11"
|
||||
app:corner="4dp"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:layout_marginTop="2dp"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg"
|
||||
app:left_bottom_corner="false"
|
||||
app:left_top_corner="true"
|
||||
app:right_bottom_corner="true"
|
||||
app:right_top_corner="false"
|
||||
app:shaderEnable="true"
|
||||
app:shaderEndColor="#E98EF4"
|
||||
app:shaderMode="leftToRight"
|
||||
app:shaderStartColor="#E669F7" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:textColor="#7E26B0"
|
||||
android:textSize="@dimen/sp_11"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_bg"
|
||||
tools:text="@string/layout_item_first_charge_reward_02" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginBottom="6dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="77dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="@dimen/dp_6"
|
||||
android:layout_marginStart="@dimen/dp_6"
|
||||
android:background="@drawable/bg_first_charge_reward_item"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_pic"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="@dimen/dp_0"
|
||||
android:scaleType="fitCenter"
|
||||
android:layout_marginStart="@dimen/dp_6"
|
||||
android:layout_marginEnd="@dimen/dp_6"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:layout_marginBottom="@dimen/dp_6"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg"
|
||||
tools:src="@drawable/ic_first_charge_default" />
|
||||
|
||||
<com.coorchice.library.SuperTextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="2dp"
|
||||
android:paddingEnd="2dp"
|
||||
android:text="@string/layout_item_first_charge_reward_01"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_11"
|
||||
app:corner="4dp"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:layout_marginTop="2dp"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg"
|
||||
app:left_bottom_corner="false"
|
||||
app:left_top_corner="true"
|
||||
app:right_bottom_corner="true"
|
||||
app:right_top_corner="false"
|
||||
app:shaderEnable="true"
|
||||
app:shaderEndColor="#E98EF4"
|
||||
app:shaderMode="leftToRight"
|
||||
app:shaderStartColor="#E669F7" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:textColor="#7E26B0"
|
||||
android:textSize="@dimen/sp_11"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_bg"
|
||||
tools:text="@string/layout_item_first_charge_reward_02" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -3498,7 +3498,7 @@
|
||||
<string name="layout_item_fans_team_task_01">每日觀看主播直播</string>
|
||||
<string name="layout_item_fans_team_task_02">+10親密值/15分鐘(每日上限20)</string>
|
||||
<string name="layout_item_first_charge_reward_01">14天</string>
|
||||
<string name="layout_item_first_charge_reward_02">玫瑰玫瑰玫瑰玫瑰</string>
|
||||
<string name="layout_item_first_charge_reward_02">玫瑰玫瑰玫瑰玫瑰玫瑰</string>
|
||||
<string name="layout_item_friend_black_list_manage_01">移除</string>
|
||||
<string name="layout_item_friend_black_list_manage_02">單刀也學士</string>
|
||||
<string name="layout_item_game_rank_01">五子棋 </string>
|
||||
@@ -5084,6 +5084,7 @@
|
||||
<string name="apply_success_wait_to_join_room">申請成功,審核通過后即可加入房間</string>
|
||||
<string name="agree_apply">同意申請</string>
|
||||
<string name="refuse_apply">拒接申請</string>
|
||||
<string name="refuse_invite">拒絕邀請</string>
|
||||
<string name="sure_to_agree_user_join_room">確定通過該用戶加入房間的申請嗎?</string>
|
||||
<string name="sure_to_refuse_user_join_room">確定拒绝該用戶加入房間的申請嗎?</string>
|
||||
<string name="seven_day_can_no_receive_apply">7天内不再接受該用戶的申請</string>
|
||||
|
@@ -25,6 +25,7 @@ import com.yizhuan.erban.ui.widget.dialog.BaseDialog;
|
||||
*/
|
||||
public class RefuseApplyDialog extends BaseDialog {
|
||||
|
||||
private String titleMsg = "";
|
||||
private String tipMsg = "";
|
||||
private boolean isInvite = false;
|
||||
|
||||
@@ -43,6 +44,11 @@ public class RefuseApplyDialog extends BaseDialog {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.layout_refuse_apply_dialog);
|
||||
|
||||
AppCompatTextView tv_message = findViewById(R.id.tv_message);
|
||||
if (tv_message != null) {
|
||||
tv_message.setText(titleMsg);
|
||||
}
|
||||
|
||||
AppCompatTextView tvName = findViewById(R.id.tv_tip);
|
||||
if (tvName != null) {
|
||||
String tip = tipMsg;
|
||||
@@ -94,6 +100,10 @@ public class RefuseApplyDialog extends BaseDialog {
|
||||
|
||||
}
|
||||
|
||||
public void setTitleMsg(String titleMsg) {
|
||||
this.titleMsg = titleMsg;
|
||||
}
|
||||
|
||||
public void setTipMsg(String tipMsg) {
|
||||
this.tipMsg = tipMsg;
|
||||
}
|
||||
|
@@ -229,9 +229,11 @@ public class HallMsgViewHolder extends MsgViewHolderBase {
|
||||
RefuseApplyDialog dialog = new RefuseApplyDialog(context);
|
||||
if(info.getUrl().contains("hall/dealInvite")){
|
||||
dialog.setIsInvite(false);
|
||||
dialog.setTitleMsg(context.getString(R.string.refuse_invite));
|
||||
dialog.setTipMsg(context.getString(R.string.sure_to_refuse_room_join_apply));
|
||||
}else {
|
||||
dialog.setIsInvite(true);
|
||||
dialog.setTitleMsg(context.getString(R.string.refuse_apply));
|
||||
dialog.setTipMsg(context.getString(R.string.sure_to_refuse_user_join_room));
|
||||
}
|
||||
dialog.setOnActionListener(new RefuseApplyDialog.OnActionListener() {
|
||||
|
@@ -122,7 +122,7 @@
|
||||
android:background="@drawable/bg_hall_income"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingTop="15dp"
|
||||
android:text="@string/layout_activity_module_clan_04"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
@@ -136,7 +136,7 @@
|
||||
android:background="@drawable/bg_single_room_income"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingTop="15dp"
|
||||
android:visibility="gone"
|
||||
android:text="@string/layout_activity_module_clan_05"
|
||||
android:textColor="@color/white"
|
||||
@@ -151,7 +151,7 @@
|
||||
android:background="@drawable/bg_hall_admin"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="@dimen/dp_0"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingTop="15dp"
|
||||
android:text="@string/layout_activity_module_clan_06"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
@@ -165,7 +165,7 @@
|
||||
android:background="@drawable/bg_hall_exchange"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="@dimen/dp_0"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingTop="15dp"
|
||||
android:visibility="gone"
|
||||
android:text="@string/exchange_permission_setting"
|
||||
android:textColor="@color/white"
|
||||
|
@@ -13,6 +13,11 @@ public class FirstChargeReward implements Parcelable, MultiItemEntity {
|
||||
public FirstChargeReward() {
|
||||
}
|
||||
|
||||
public static final int ONE = 1;
|
||||
public static final int TWO = 2;
|
||||
public static final int THREE = 3;
|
||||
public static final int FOUR = 4;
|
||||
|
||||
private String showPir;
|
||||
private String showText;
|
||||
private String showTime;
|
||||
@@ -48,7 +53,7 @@ public class FirstChargeReward implements Parcelable, MultiItemEntity {
|
||||
}
|
||||
};
|
||||
|
||||
public void setType(int type) {
|
||||
public void setItemType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user