短视频源码,实现文字横向移动效果(跑马灯效果)
16lz
2021-12-04
短视频源码,ellipsize 可以设置跑马灯效果 具体代码设置如下
android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="marquee" android:layout_marginTop="100dp" android:focusableInTouchMode="true" android:singleLine="true" android:marqueeRepeatLimit="marquee_forever" android:text="君不见,黄河之水天上来,奔流到海不复回。君不见,高堂明镜悲白发,朝如青丝暮成雪。人生得意须尽欢,莫使金樽空对月。天生我材必有用,千金散尽还复来。烹羊宰牛且为乐,会须一饮三百杯。岑夫子,丹丘生,将进酒,杯莫停" android:textColor="@android:color/holo_red_dark"> android:ellipsize="marquee" //设置为跑马灯效果android:marqueeRepeatLimit="marquee_forever" //设置为重复走动android:focusable="true" //获取焦点android:singleLine="true" //单行文字 android:focusableInTouchMode="true" //获取focus
以上就是短视频源码关于实现文字横向移动效果的全部代码,更多信息欢迎关注之后的文章
本文转载自网络,转载仅为分享干货知识,如有侵权欢迎联系云豹科技进行删除处理
更多相关文章
- Android(安卓)自定义圆角按钮
- Android中UI设计的一些技巧!!!
- Android抽屉实现
- Android(安卓)自定义圆角按钮
- android - TextView单行显示...或者文字左右滚动(走马灯效果)
- android 圆环(ring)drawable 画法 ——简单记录
- Android(安卓)Studio 官方示例源码地址
- 多点触控测试代码 PointerLocation
- android源码分享