Commit 95943cd1 authored by mengcuiguang's avatar mengcuiguang

新人红包去除倒计时,添加关闭

parent 951df63f
......@@ -18,7 +18,7 @@ import kotlinx.android.synthetic.main.dialog_newcomer.*
import kotlinx.android.synthetic.main.dialog_sign.*
import java.math.BigDecimal
class NewcomerDialog(private val context: Context, private val rewardCoin: Int) :
class NewcomerDialog(private val context: Context, private val rewardCoin: Int, listener: DialogListener) :
Dialog(
context, R.style.dialog
) {
......@@ -59,6 +59,7 @@ class NewcomerDialog(private val context: Context, private val rewardCoin: Int)
isClickBtn = true
adListener?.showAd()
}
tv_newcomer_time.setOnClickListener(listener)
val sumCoin = rewardCoin.toString()
val allcoinBig = BigDecimal(sumCoin)
......@@ -71,18 +72,18 @@ class NewcomerDialog(private val context: Context, private val rewardCoin: Int)
.append("元")
.create()
Handler().postDelayed({
startTimer()
}, 900)
// Handler().postDelayed({
// startTimer()
// }, 900)
}
override fun dismiss() {
super.dismiss()
if (timer != null) { //防止计时器重复
timer!!.stop()
timer = null
}
// if (timer != null) { //防止计时器重复
// timer!!.stop()
// timer = null
// }
}
fun startTimer() {
......
......@@ -37,6 +37,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:background="@mipmap/ic_draw_quit"
android:gravity="center"
android:textColor="@color/white"
android:textSize="14sp"></TextView>
......
......@@ -175,7 +175,7 @@
android:id="@+id/iv_main_sign"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="400dp"
android:layout_marginTop="330dp"
android:layout_marginRight="20dp"
android:visibility="gone"
app:layout_constraintRight_toRightOf="parent"
......@@ -201,6 +201,18 @@
android:textSize="13sp" />
</FrameLayout>
<ImageView
android:id="@+id/iv_main_newcomer"
android:layout_width="65dp"
android:layout_height="65dp"
android:layout_marginLeft="10dp"
android:visibility="gone"
android:layout_marginTop="430dp"
android:layout_marginRight="20dp"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:src="@mipmap/ic_main_comer" />
<ImageView
android:id="@+id/iv_main_tempanim"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment