选框动画不起作用,这就是我所做的.
<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 – 选框文本视图动画所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)