0
点赞
收藏
分享

微信扫一扫

Android初学设置文字跑马灯效果

西特张 2022-01-30 阅读 93


在src/main/res/layout/activity_main.xml文件下添加以下代码

<TextView
android:id="@+id/tv_7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

android:text="往事随风往事随风往事随风往事随风往事随风往事随风"
android:textColor="#000000"
android:textSize="15pt"
android:singleLine="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
tools:ignore="MissingConstraints"
tools:layout_editor_absoluteX="40dp"
tools:layout_editor_absoluteY="343dp"
android:focusable="true"
android:clickable="true"
android:focusableInTouchMode="true"/>

效果图



举报

相关推荐

0 条评论