lmw
2025-03-07 f84c51bb2f6be93b1ff6e48077316eaabd713d9f
app/src/main/java/com/dollearn/student/ui/home/ChooseVoiceFragment.kt
@@ -58,6 +58,8 @@
    private var nowVoiceView:View? = null
    private val isShowText by lazy { SPUtils.instance().getBoolean(Const.IS_SHOW_TEXT,true) }
    override fun onFirstVisibleToUser() {
        player.setOnAudioStatusUpdateListener(this)
        player.stopPlayMusic()
@@ -243,15 +245,16 @@
        val shuffledList = list.shuffled()
        voiceList.clear()
        voiceList.addAll(shuffledList)
        nameViews.forEachIndexed { index, textView ->
            if (index == currentIndex){
                textView.text = originList[index].name
                textView.backgroundResource = R.color.textColor99
            }else{
                textView.text = ""
                textView.backgroundResource = R.color.page_bg
        if (isShowText)
            nameViews.forEachIndexed { index, textView ->
                if (index == currentIndex){
                    textView.text = originList[index].name
                    textView.backgroundResource = R.color.textColor99
                }else{
                    textView.text = ""
                    textView.backgroundResource = R.color.page_bg
                }
            }
        }
        //设置动画飞行路径 3对4
        val rightVoiceIndex = voiceList.indexOf(imageNow.correct)
        var start = 0