显示金币数量

This commit is contained in:
renhaoting 2025-12-04 11:51:50 +08:00
parent 47e4d3dba5
commit f2cbc14727
4 changed files with 9 additions and 7 deletions

View File

@ -7,8 +7,8 @@ import com.gamedog.vididin.databinding.DialogWatchVideoBinding
import com.gamedog.vididin.router.Router
class WatchAdDialog(context: Activity, private val mTaskType: Int,
private val mTaskDataJson: String?)
class WatchAdDialog(context: Activity, private val mTaskType: Int, private val mGoldNum: Int? = 0,
private val mTaskDataJson: String? = "")
: BindingDialog<DialogWatchVideoBinding>(context, DialogWatchVideoBinding::inflate) {
init {
@ -33,6 +33,8 @@ class WatchAdDialog(context: Activity, private val mTaskType: Int,
}
}
}
tvGoldNum.text = "+$mGoldNum"
}
}

View File

@ -72,7 +72,7 @@ class TasksFragment : AppViewsFragment<ViewBinding, UiState, ViewModel>(), OnTab
override fun ViewBinding.initViews() {
with(binding) {
setOnClickBatch(ivGotoDailySign, llTaskBenefit, llTaskWatchVideo, llTaskGame,
setOnClickBatch(ivGotoDailySign, llTaskBenefit, llTaskWatchAd, llTaskGame,
llTaskZerobuy, tvWatchVideoForConvertGoldToCash, tvWithdraw) {
when(this) {
ivGotoDailySign->{
@ -83,8 +83,8 @@ class TasksFragment : AppViewsFragment<ViewBinding, UiState, ViewModel>(), OnTab
Router.Benefit.startActivity(requireActivity())
}
llTaskWatchVideo->{
WatchAdDialog(requireActivity(), VididinEvents.Event_AD_TASK_TYPE_Watch_Ad_Earn_Gold, null).show()
llTaskWatchAd->{
WatchAdDialog(requireActivity(), VididinEvents.Event_AD_TASK_TYPE_Watch_Ad_Earn_Gold, 200).show()
}
llTaskGame->{

View File

@ -54,12 +54,12 @@
/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_gold_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="28sp"
android:textStyle="bold"
android:textColor="@color/red_5c"
android:text="+100"
android:layout_gravity="bottom|center"
android:layout_marginBottom="110dp"
/>

View File

@ -224,7 +224,7 @@
</LinearLayout>
<LinearLayout
android:id="@+id/ll_task_watch_video"
android:id="@+id/ll_task_watch_ad"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"