新手任务dialog
This commit is contained in:
parent
e52c3eb97e
commit
5ef04e37f8
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.gamedog.vididin.main
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import com.ama.core.architecture.util.setOnClickBatch
|
||||||
|
import com.ama.core.architecture.widget.BindingDialog
|
||||||
|
import com.gamedog.vididin.databinding.DialogBeginnerGiftBinding
|
||||||
|
|
||||||
|
|
||||||
|
class BeginnerGiftDialog(context: Context) : BindingDialog<DialogBeginnerGiftBinding>(context, DialogBeginnerGiftBinding::inflate) {
|
||||||
|
|
||||||
|
init {
|
||||||
|
build()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private fun build() {
|
||||||
|
with()
|
||||||
|
setCenter()
|
||||||
|
setMaskValue(0.8f)
|
||||||
|
|
||||||
|
mBinding.run {
|
||||||
|
setOnClickBatch(tvAction) {
|
||||||
|
when (this) {
|
||||||
|
tvAction -> {
|
||||||
|
gotoWatchVideo()
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun gotoWatchVideo() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -65,6 +65,9 @@ class MainActivity : AppViewsActivity<ViewBinding, UiState, ViewModel>(), OnTabS
|
||||||
viewPager2.isUserInputEnabled = false
|
viewPager2.isUserInputEnabled = false
|
||||||
viewPager2.setPageTransformer { _, _ -> }
|
viewPager2.setPageTransformer { _, _ -> }
|
||||||
viewPager2.offscreenPageLimit
|
viewPager2.offscreenPageLimit
|
||||||
|
|
||||||
|
|
||||||
|
BeginnerGiftDialog(this@MainActivity).show()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun ViewBinding.initListeners() {
|
override fun ViewBinding.initListeners() {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,78 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" >
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@mipmap/daily_sign_bg"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_margin="20dp">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tv_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:textSize="21sp"
|
||||||
|
android:textColor="@color/red_11"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:text="@string/papabens"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tv_hint"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textColor="@color/red_11"
|
||||||
|
android:text="@string/papabens_hint"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tv_cash_num"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="38dp"
|
||||||
|
android:textSize="30sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@color/green_39"
|
||||||
|
android:text="@string/cash01"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center"
|
||||||
|
android:drawableStart="@mipmap/temp"
|
||||||
|
android:drawablePadding="10dp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tv_action"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="38dp"
|
||||||
|
android:paddingVertical="10dp"
|
||||||
|
android:layout_marginHorizontal="28dp"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:background="@mipmap/temp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@color/red_11"
|
||||||
|
android:text="@string/resgatar"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
@ -73,6 +73,7 @@
|
||||||
<color name="red_0b">#FFFF740B</color>
|
<color name="red_0b">#FFFF740B</color>
|
||||||
<color name="red_2f">#FFFF862F</color>
|
<color name="red_2f">#FFFF862F</color>
|
||||||
<color name="gray_f2">#fff2f2f2</color>
|
<color name="gray_f2">#fff2f2f2</color>
|
||||||
|
<color name="red_11">#FF931411</color>
|
||||||
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
@ -20,4 +20,8 @@
|
||||||
<string name="progress">Progresso:</string>
|
<string name="progress">Progresso:</string>
|
||||||
<string name="termina">Termina em</string>
|
<string name="termina">Termina em</string>
|
||||||
<string name="watch_video_hint">Parabéns! Você ganhou a recompensa por assistir ao vídeo!</string>
|
<string name="watch_video_hint">Parabéns! Você ganhou a recompensa por assistir ao vídeo!</string>
|
||||||
|
<string name="papabens">Parabéns!</string>
|
||||||
|
<string name="papabens_hint">Você recebeu um presente de boas-vindas</string>
|
||||||
|
<string name="cash01">R$ 0.1</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
Loading…
Reference in New Issue