From a036ac0c6c8d87f36e68f88f05231c3be23fcc4b Mon Sep 17 00:00:00 2001 From: lmw <125975490@qq.com> Date: 星期四, 01 八月 2024 13:32:55 +0800 Subject: [PATCH] 修改bug --- app/src/main/java/com/dollearn/student/ui/home/QAFragment.kt | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/app/src/main/java/com/dollearn/student/ui/home/QAFragment.kt b/app/src/main/java/com/dollearn/student/ui/home/QAFragment.kt index 7035674..ab2bb3c 100644 --- a/app/src/main/java/com/dollearn/student/ui/home/QAFragment.kt +++ b/app/src/main/java/com/dollearn/student/ui/home/QAFragment.kt @@ -57,7 +57,6 @@ private val voiceViews by lazy { arrayListOf(cl_voice_1,cl_voice_2,cl_voice_3,cl_voice_4) } //语音蓝条 private val v1Views by lazy { arrayListOf(iv1_1,iv1_2,iv1_3,iv1_4,iv1_answer_1,iv1_answer_2,iv1_answer_3) } private val v2Views by lazy { arrayListOf(iv2_1,iv2_2,iv2_3,iv2_4,iv2_answer_1,iv2_answer_2,iv2_answer_3) } - private val v3Views by lazy { arrayListOf(iv3_1,iv3_2,iv3_3,iv3_4) } private val resultViews by lazy { arrayListOf(iv_right_1,iv_right_2,iv_right_3,iv_right_4) } private val playingViews by lazy { arrayListOf(iv_playing_1,iv_playing_2,iv_playing_3,iv_playing_4,iv_playing_answer_1,iv_playing_answer_2,iv_playing_answer_3) } @@ -152,6 +151,10 @@ act.rightCount++ Log.e(TAG,"选择正确") transAnimation(cl_answer_2,voiceViews[questionIndex]) + resultViews[questionIndex].visible() + resultViews[questionIndex].postDelayed({ + resultViews[questionIndex].gone() + },3000) nowVoiceView = voiceViews[questionIndex] handler?.sendEmptyMessage(PLAY_RIGHT) }else{ @@ -179,6 +182,10 @@ act.rightCount++ Log.e(TAG,"选择正确") transAnimation(cl_answer_3,voiceViews[questionIndex]) + resultViews[questionIndex].visible() + resultViews[questionIndex].postDelayed({ + resultViews[questionIndex].gone() + },3000) nowVoiceView = voiceViews[questionIndex] handler?.sendEmptyMessage(PLAY_RIGHT) }else{ @@ -400,4 +407,9 @@ super.onPause() player.stopPlayMusic() } + + override fun onDestroy() { + super.onDestroy() + handler?.removeCallbacksAndMessages(null) + } } \ No newline at end of file -- Gitblit v1.7.1