lmw
2 天以前 855a7e18a795f0db2453a19e3e8f26ba2ff553b4
app/src/main/java/com/dollearn/student/ui/home/MatchFragment.kt
@@ -593,44 +593,24 @@
                iv1_1.visible()
                iv2_1.visible()
                iv_playing_1.gone()
                if (nowVoiceView!=null && data!!.subjectList[group][imgPosition].completed){
                    voiceIndex = -1
                    nowVoiceView = null
                    isAutoPlaying = true
                    cl_voice_2.callOnClick()
                }
            }
            1->{
                iv1_2.visible()
                iv2_2.visible()
                iv_playing_2.gone()
                if (nowVoiceView!=null && data!!.subjectList[group][imgPosition].completed){
                    voiceIndex = -1
                    nowVoiceView = null
                    isAutoPlaying = true
                    cl_voice_3.callOnClick()
                }
            }
            2->{
                iv1_3.visible()
                iv2_3.visible()
                iv_playing_3.gone()
                if (nowVoiceView!=null && data!!.subjectList[group][imgPosition].completed){
                    voiceIndex = -1
                    nowVoiceView = null
                    isAutoPlaying = true
                    cl_voice_4.callOnClick()
                }
            }
            3->{
                iv1_4.visible()
                iv2_4.visible()
                iv_playing_4.gone()
                if (nowVoiceView!=null && data!!.subjectList[group][imgPosition].completed){
                    voiceIndex = -1
                    nowVoiceView = null
                }
            }
            4->{
@@ -658,16 +638,50 @@
                voiceIndex = -1
            }
        }
        if (data!!.subjectList[group].filter { it.completed }.size == 4){ //全部答对
            handler?.sendEmptyMessage(TO_NEXT)
        }
        if (errorPlaying)
            errorPlaying = false
        if (rightPlaying){
            rightPlaying = false
            nowVoiceView?.callOnClick()
//            nowVoiceView?.callOnClick() //客户需求:回答正确后不再重播语音 直接下一题
            data!!.subjectList[group][imgPosition].completed = true
            when(voiceIndex){
                0->{
                    if (nowVoiceView!=null && data!!.subjectList[group][imgPosition].completed){
                        voiceIndex = -1
                        nowVoiceView = null
                        isAutoPlaying = true
                        cl_voice_2.callOnClick()
                    }
                }
                1->{
                    if (nowVoiceView!=null && data!!.subjectList[group][imgPosition].completed){
                        voiceIndex = -1
                        nowVoiceView = null
                        isAutoPlaying = true
                        cl_voice_3.callOnClick()
                    }
                }
                2->{
                    if (nowVoiceView!=null && data!!.subjectList[group][imgPosition].completed){
                        voiceIndex = -1
                        nowVoiceView = null
                        isAutoPlaying = true
                        cl_voice_4.callOnClick()
                    }
                }
                3->{
                    if (nowVoiceView!=null && data!!.subjectList[group][imgPosition].completed){
                        voiceIndex = -1
                        nowVoiceView = null
                    }
                }
            }
            if (data!!.subjectList[group].filter { it.completed }.size == 4){ //全部答对
                handler?.sendEmptyMessage(TO_NEXT)
            }
        }
    }