中奖 未中奖 dialog调整 赋值
This commit is contained in:
parent
84f367bdca
commit
7976c1f358
|
|
@ -128,7 +128,6 @@ class ZeroBuyActivity : AppViewsEmptyViewModelActivity<ViewBinding>() {
|
||||||
|
|
||||||
private fun requestData() {
|
private fun requestData() {
|
||||||
lifecycleScope.launch {
|
lifecycleScope.launch {
|
||||||
repeatOnLifecycle(Lifecycle.State.STARTED) {
|
|
||||||
viewModel.ZeroBuyListData.collect { result ->
|
viewModel.ZeroBuyListData.collect { result ->
|
||||||
when (result) {
|
when (result) {
|
||||||
is Result.Loading -> { showLoading(false) }
|
is Result.Loading -> { showLoading(false) }
|
||||||
|
|
@ -142,7 +141,6 @@ class ZeroBuyActivity : AppViewsEmptyViewModelActivity<ViewBinding>() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
viewModel.requestZeroBuyInfo()
|
viewModel.requestZeroBuyInfo()
|
||||||
}
|
}
|
||||||
|
|
@ -175,13 +173,13 @@ class ZeroBuyActivity : AppViewsEmptyViewModelActivity<ViewBinding>() {
|
||||||
|
|
||||||
|
|
||||||
private fun updateUIs(data: ZeroBuyResp) {
|
private fun updateUIs(data: ZeroBuyResp) {
|
||||||
showCompletePurchasesInfo(data.mFinishedList)
|
|
||||||
mAdapter.submitList(data.mCurrentList)
|
mAdapter.submitList(data.mCurrentList)
|
||||||
|
showCompletePurchasesInfo(data.mFinishedList)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showCompletePurchasesInfo(finishedList: List<ZeroBuyItem>?) {
|
private fun showCompletePurchasesInfo(finishedList: List<ZeroBuyItem>?) {
|
||||||
finishedList?.let {
|
finishedList?.let {
|
||||||
val userId = AccountManager.getAccount()?.userId
|
val userId = AccountManager.getAccount().userId
|
||||||
val joinedIdList = SpUtil.instance().getList<Int>(SpUtil.KEY_ZEROBUY_JOINED_ACTIVITY_IDS)
|
val joinedIdList = SpUtil.instance().getList<Int>(SpUtil.KEY_ZEROBUY_JOINED_ACTIVITY_IDS)
|
||||||
val hasNotifiedIdList: MutableList<Int> = SpUtil.instance().getList<Int>(SpUtil.KEY_ZEROBUY_HAS_NOTIFY_IDS).toMutableList()
|
val hasNotifiedIdList: MutableList<Int> = SpUtil.instance().getList<Int>(SpUtil.KEY_ZEROBUY_HAS_NOTIFY_IDS).toMutableList()
|
||||||
it.forEach { item->
|
it.forEach { item->
|
||||||
|
|
|
||||||
|
|
@ -31,14 +31,10 @@ class ZeroBuyNotWinDialog(context: Activity, private val item: ZeroBuyItem) : Bi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tvTitle.text = item.title
|
tvTitleSub.text = item.title + " - " + item.price
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun gotoWatchVideo() {
|
|
||||||
Router.Withdraw.startActivity(mActivity)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import com.ama.core.architecture.util.setOnClickBatch
|
||||||
import com.ama.core.architecture.widget.BindingDialog
|
import com.ama.core.architecture.widget.BindingDialog
|
||||||
import com.gamedog.vididin.beans.ZeroBuyItem
|
import com.gamedog.vididin.beans.ZeroBuyItem
|
||||||
import com.vididin.real.money.game.databinding.DialogZeroBuyWinBinding as ViewBinding
|
import com.vididin.real.money.game.databinding.DialogZeroBuyWinBinding as ViewBinding
|
||||||
import com.gamedog.vididin.router.Router
|
|
||||||
|
|
||||||
|
|
||||||
class ZeroBuyWinDialog(context: Activity, private val item: ZeroBuyItem) : BindingDialog<ViewBinding>(context, ViewBinding::inflate) {
|
class ZeroBuyWinDialog(context: Activity, private val item: ZeroBuyItem) : BindingDialog<ViewBinding>(context, ViewBinding::inflate) {
|
||||||
|
|
@ -31,7 +30,7 @@ class ZeroBuyWinDialog(context: Activity, private val item: ZeroBuyItem) : Bindi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tvTitle.text = item.title
|
tvTitleSub.text = item.title + " - " + item.price
|
||||||
tvPurchaseId.text = item.redeem_code
|
tvPurchaseId.text = item.redeem_code
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,21 +28,24 @@
|
||||||
android:background="@mipmap/zero_win_dialog_bg"
|
android:background="@mipmap/zero_win_dialog_bg"
|
||||||
>
|
>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:id="@+id/iv_title"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:src="@mipmap/temp"
|
|
||||||
android:layout_marginTop="7dp"
|
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/tv_title"
|
android:id="@+id/tv_title"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="3dp"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:text="@string/zero_not_win_title"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tv_title_sub"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:text="title"
|
android:text="title"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -28,17 +28,20 @@
|
||||||
android:background="@mipmap/zero_win_dialog_bg"
|
android:background="@mipmap/zero_win_dialog_bg"
|
||||||
>
|
>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/iv_title"
|
android:id="@+id/tv_title"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:src="@mipmap/temp"
|
android:layout_marginTop="3dp"
|
||||||
android:layout_marginTop="7dp"
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:text="@string/zero_not_win_title"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/tv_title"
|
android:id="@+id/tv_title_sub"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
|
|
@ -51,7 +54,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:src="@mipmap/record_win"
|
android:src="@mipmap/record_win"
|
||||||
android:layout_marginTop="7dp"
|
android:layout_marginTop="17dp"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
|
@ -112,6 +115,7 @@
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
android:paddingVertical="8dp"
|
android:paddingVertical="8dp"
|
||||||
android:background="@drawable/bg_round_blue_gradient_30">
|
android:background="@drawable/bg_round_blue_gradient_30">
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
|
|
||||||
|
|
@ -162,5 +162,6 @@
|
||||||
<string name="day_simple">d</string>
|
<string name="day_simple">d</string>
|
||||||
<string name="hour_simple">h</string>
|
<string name="hour_simple">h</string>
|
||||||
<string name="dont_enought_diamond">Diamantes insuficientes</string>
|
<string name="dont_enought_diamond">Diamantes insuficientes</string>
|
||||||
|
<string name="zero_not_win_title">Festa Grátis</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
Loading…
Reference in New Issue