【发布时间】:2019-10-01 10:45:06
【问题描述】:
我有 Textview,当活动加载时它最初是隐藏的。当点击按钮时,它会显示出来。 但是第一次 textview 显示选框时不起作用..除非它工作正常..如果屏幕在解锁后被锁定它开始工作正常..
我在代码中将字符串设置为文本,并且还在代码中使用了 setselected(true)..
<TextView
android:id="@+id/txtInfo"
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_below="@id/linearTtitle"
android:background="@color/md_grey_300"
android:ellipsize="marquee"
android:freezesText="true"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
android:text=""
android:textColor="@color/md_black_1000"
android:textSize="16sp" />`
【问题讨论】: