一、文字滚动
文字左右滚动三个属性:
android:singleLine=”true”
android:ellipsize=”marquee”
android:marqueeRepeatLimit=”marquee_forever”
文字限制:android:maxEms="10" //限制字节长度为10
(注意:layout_width="wrap_content",宽度必须是wrap_content,为match_parent无效)
Android中我们为了实现文本的滚动可以在ScrollView中嵌入一个TextView,其实TextView自己也可以实现多行滚动的,毕竟ScrollView必须只能有一个直接的子类布局。只要在layout中简单设置几个属性就可以轻松实现。
android:id="@+id/tvCWJ"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scrollbars="vertical"
android:singleLine="false"
android:maxLines="15"
android:textColor="#FF0000"
/>
< TextView
android:id = "@+id/app_shortcontent"
an
如果觉得《安卓超过两行就加省略号_Android TextView内容过长加省略号 点击显示全部内容...》对你有帮助,请点赞、收藏,并留下你的观点哦!