android– 选框文本视图动画

android– 选框文本视图动画,第1张

概述选框动画不起作用,这就是我所做的.<LinearLayoutandroid:layout_height="wrap_content"android:layout_width="wrap_content"android:background="@drawable/bg_trans"android:layout_alignParentBottom="true"an

选框动画不起作用,这就是我所做的.

<linearLayout androID:layout_height="wrap_content"            androID:layout_wIDth="wrap_content" androID:background="@drawable/bg_trans"            androID:layout_alignParentBottom="true" androID:orIEntation="vertical">            <TextVIEw androID:ID="@+ID/trackname"            androID:layout_height="wrap_content" androID:layout_wIDth="wrap_content"                            androID:textcolor="@androID:color/white" androID:textSize="18sp"            androID:maxlines="2" androID:ellipsize="marquee"            androID:scrollHorizontally="true"             androID:focusable="true" androID:focusableIntouchMode="true"            androID:marqueeRepeatlimit="marquee_forever"            androID:layout_gravity="center_horizontal" />            <TextVIEw androID:ID="@+ID/artistname"             androID:layout_height="wrap_content" androID:layout_wIDth="wrap_content"                            androID:textcolor="@androID:color/white" androID:textSize="18sp"            androID:maxlines="2" androID:ellipsize="marquee"            androID:scrollHorizontally="true"             androID:focusable="true" androID:focusableIntouchMode="true"            androID:marqueeRepeatlimit="marquee_forever"            androID:layout_gravity="center_horizontal" />            </linearLayout>

它适用于第一个textvIEw,但不适用于第二个.我究竟做错了什么?

解决方法:

这对我有用 –

<TextVIEw androID:ID="@+ID/capture_mode"androID:layout_wIDth="200px"androID:layout_height="wrap_content"           androID:text="This is a test of marquee on the text vIEw in androID."androID:ellipsize="marquee"androID:scrollHorizontally="true"androID:singleline="true"androID:focusable="true"androID:focusableIntouchMode="true"androID:marqueeRepeatlimit="marquee_forever"/>

字段marqueeRepeatlimit将设置重复次数.

更新:文本视图的宽度需要硬编码为特定值,您可以将其设置为wrap_content.在这种情况下,选取框仍然可以工作,只是在文本结束后和开始再次显示文本之前它将有一些空白. (想想数字招牌,在显示下一个项目之前,它们在显示屏上有一些间隙.)

总结

以上是内存溢出为你收集整理的android – 选框文本视图动画全部内容,希望文章能够帮你解决android – 选框文本视图动画所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1115337.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存