Commit 089647d1 authored by mengcuiguang2's avatar mengcuiguang2

代码优化

parent 199e898c
...@@ -189,7 +189,7 @@ ...@@ -189,7 +189,7 @@
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity <activity
android:name=".ui.activities.AlipayTimeActivity" android:name=".ui.activitys.AlipayTimeActivity"
android:exported="false" android:exported="false"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/TransparentTheme" /> android:theme="@style/TransparentTheme" />
......
...@@ -23,17 +23,17 @@ class AlipayTimeActivity : BaseActivity(), View.OnClickListener { ...@@ -23,17 +23,17 @@ class AlipayTimeActivity : BaseActivity(), View.OnClickListener {
override fun toggleOverridePendingTransition() = true override fun toggleOverridePendingTransition() = true
override fun getOverridePendingTransitionMode() = TransitionMode.SCALE override fun getOverridePendingTransitionMode() = TransitionMode.FADE
override fun initViewsAndEvents() { override fun initViewsAndEvents() {
countDownTimer= SimpleCountDownTimer(5000, tv_alipaytime).setOnFinishListener { countDownTimer= SimpleCountDownTimer(30*60*1000, tv_alipaytime).setOnFinishListener {
showToast("11111") showToast("11111")
}.start() as SimpleCountDownTimer? }.start() as SimpleCountDownTimer?
} }
override fun finish() { override fun finish() {
super.finish() super.finish()
overridePendingTransition(0, R.anim.scale_out) overridePendingTransition(0, R.anim.fade_out)
} }
override fun onDestroy() { override fun onDestroy() {
...@@ -41,11 +41,11 @@ class AlipayTimeActivity : BaseActivity(), View.OnClickListener { ...@@ -41,11 +41,11 @@ class AlipayTimeActivity : BaseActivity(), View.OnClickListener {
countDownTimer?.cancel() countDownTimer?.cancel()
} }
override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean { // override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean {
return if (keyCode == KeyEvent.KEYCODE_BACK) { // return if (keyCode == KeyEvent.KEYCODE_BACK) {
true // true
} else super.onKeyDown(keyCode, event) // } else super.onKeyDown(keyCode, event)
} // }
override fun onClick(v: View) { override fun onClick(v: View) {
if (AntiShake.check(v.id)) return if (AntiShake.check(v.id)) return
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/full_transparent"> android:background="@color/half_transparent">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
<TextView <TextView
android:id="@+id/tv_alipaytime" android:id="@+id/tv_alipaytime"
android:textSize="40sp"
android:layout_gravity="center"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/red"></TextView> android:textColor="@color/red"></TextView>
......
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