From 1c408598cd0ebb6ccf6fdd08b7f8e65e10579024 Mon Sep 17 00:00:00 2001 From: level <1364007522@qq.com> Date: Tue, 30 Jul 2024 16:22:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yingmao/clash/act/NewMainActivity.kt | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) 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 + } }