diff --git a/app/src/main/java/com/yingmao/clash/act/NewMainActivity.kt b/app/src/main/java/com/yingmao/clash/act/NewMainActivity.kt index 6483a26..fb3bc40 100644 --- a/app/src/main/java/com/yingmao/clash/act/NewMainActivity.kt +++ b/app/src/main/java/com/yingmao/clash/act/NewMainActivity.kt @@ -513,21 +513,21 @@ class NewMainActivity : BaseActivity() { setSometion() } - private fun initMainPageHorseRaceLamp(noticeData:String) { - val mainPageHorseRaceLamp=findViewById(R.id.mainPageHorseRaceLamp) - if(noticeData.length>20){ - mainPageHorseRaceLamp.text=noticeData - mainPageHorseRaceLamp.requestFocus() - mainPageHorseRaceLamp.marqueeRepeatLimit = Integer.MAX_VALUE - mainPageHorseRaceLamp.isFocusable = true - mainPageHorseRaceLamp.ellipsize = TextUtils.TruncateAt.MARQUEE - mainPageHorseRaceLamp.setSingleLine() - mainPageHorseRaceLamp.isFocusableInTouchMode = true - mainPageHorseRaceLamp.setHorizontallyScrolling(true) - }else{ - val llNoticeBackground=findViewById(R.id.llNoticeBackground) - llNoticeBackground.visibility=View.GONE - } + private fun initMainPageHorseRaceLamp(noticeData: String) { + val mainPageHorseRaceLamp = findViewById(R.id.mainPageHorseRaceLamp) + if (noticeData.length > 20) { + mainPageHorseRaceLamp.text = noticeData + mainPageHorseRaceLamp.requestFocus() + mainPageHorseRaceLamp.marqueeRepeatLimit = Integer.MAX_VALUE + mainPageHorseRaceLamp.isFocusable = true + mainPageHorseRaceLamp.ellipsize = TextUtils.TruncateAt.MARQUEE + mainPageHorseRaceLamp.setSingleLine() + mainPageHorseRaceLamp.isFocusableInTouchMode = true + mainPageHorseRaceLamp.setHorizontallyScrolling(true) + } else { + val llNoticeBackground = findViewById(R.id.llNoticeBackground) + llNoticeBackground.visibility = View.GONE + } }