1. Marquee effect
- The middle three lines of code set the single-line marquee to run all the time
<TextView
android:id="@+id/Run_textid"
android:layout_width="80dp"
android:layout_height="80dp"
android:textSize="40dp"
android:text="Hello World!Hello World!"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
android:singleLine="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
- MainAC setting selected
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
Run_textid.isSelected=true
}
}
2. Kotlin1.3kts only has view binding
3. AS File setting kotlin1.6->1.8 will not report an error