| | |
| | | countTime = TIME //重置答题时间 |
| | | tv_tip.text = "准备听题" |
| | | state = 0 |
| | | handler?.sendEmptyMessageDelayed(PLAY_VOICE, if (playNow) 200 else 3000) |
| | | handler?.sendEmptyMessageDelayed(PLAY_VOICE, if (playNow) 200 else 1000) |
| | | }else{ |
| | | tv_sort.visibility = View.INVISIBLE |
| | | cl_voice.visibility = View.INVISIBLE |
| | |
| | | errorPlaying = false |
| | | else if (rightPlaying){ |
| | | rightPlaying = false |
| | | val subject = data!!.subjectList[data!!.subjectList.map { it.correct } |
| | | .indexOf(voiceList[index])] //当前音频对应题目 |
| | | subject.completed = true |
| | | handler?.sendEmptyMessage(PLAY_VOICE) |
| | | }else{ |
| | | cl_voice.translationX = 0f |
| | | cl_voice.translationY = 0f |
| | | cl_voice.layoutParams.width = dip(159) |
| | | cl_voice.layoutParams.height = dip(52) |
| | | cl_voice.requestLayout() |
| | | }else{ |
| | | |
| | | } |
| | | } |
| | | |