显示金币数量
This commit is contained in:
parent
47e4d3dba5
commit
f2cbc14727
|
|
@ -7,8 +7,8 @@ import com.gamedog.vididin.databinding.DialogWatchVideoBinding
|
||||||
import com.gamedog.vididin.router.Router
|
import com.gamedog.vididin.router.Router
|
||||||
|
|
||||||
|
|
||||||
class WatchAdDialog(context: Activity, private val mTaskType: Int,
|
class WatchAdDialog(context: Activity, private val mTaskType: Int, private val mGoldNum: Int? = 0,
|
||||||
private val mTaskDataJson: String?)
|
private val mTaskDataJson: String? = "")
|
||||||
: BindingDialog<DialogWatchVideoBinding>(context, DialogWatchVideoBinding::inflate) {
|
: BindingDialog<DialogWatchVideoBinding>(context, DialogWatchVideoBinding::inflate) {
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
|
@ -33,6 +33,8 @@ class WatchAdDialog(context: Activity, private val mTaskType: Int,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tvGoldNum.text = "+$mGoldNum"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ class TasksFragment : AppViewsFragment<ViewBinding, UiState, ViewModel>(), OnTab
|
||||||
|
|
||||||
override fun ViewBinding.initViews() {
|
override fun ViewBinding.initViews() {
|
||||||
with(binding) {
|
with(binding) {
|
||||||
setOnClickBatch(ivGotoDailySign, llTaskBenefit, llTaskWatchVideo, llTaskGame,
|
setOnClickBatch(ivGotoDailySign, llTaskBenefit, llTaskWatchAd, llTaskGame,
|
||||||
llTaskZerobuy, tvWatchVideoForConvertGoldToCash, tvWithdraw) {
|
llTaskZerobuy, tvWatchVideoForConvertGoldToCash, tvWithdraw) {
|
||||||
when(this) {
|
when(this) {
|
||||||
ivGotoDailySign->{
|
ivGotoDailySign->{
|
||||||
|
|
@ -83,8 +83,8 @@ class TasksFragment : AppViewsFragment<ViewBinding, UiState, ViewModel>(), OnTab
|
||||||
Router.Benefit.startActivity(requireActivity())
|
Router.Benefit.startActivity(requireActivity())
|
||||||
}
|
}
|
||||||
|
|
||||||
llTaskWatchVideo->{
|
llTaskWatchAd->{
|
||||||
WatchAdDialog(requireActivity(), VididinEvents.Event_AD_TASK_TYPE_Watch_Ad_Earn_Gold, null).show()
|
WatchAdDialog(requireActivity(), VididinEvents.Event_AD_TASK_TYPE_Watch_Ad_Earn_Gold, 200).show()
|
||||||
}
|
}
|
||||||
|
|
||||||
llTaskGame->{
|
llTaskGame->{
|
||||||
|
|
|
||||||
|
|
@ -54,12 +54,12 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tv_gold_num"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="28sp"
|
android:textSize="28sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textColor="@color/red_5c"
|
android:textColor="@color/red_5c"
|
||||||
android:text="+100"
|
|
||||||
android:layout_gravity="bottom|center"
|
android:layout_gravity="bottom|center"
|
||||||
android:layout_marginBottom="110dp"
|
android:layout_marginBottom="110dp"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -224,7 +224,7 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/ll_task_watch_video"
|
android:id="@+id/ll_task_watch_ad"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue