Android和一个TextView的水平字幕的滚动速度 [英] Android and a TextView's horizontal marquee scroll rate

查看:1039
本文介绍了Android和一个TextView的水平字幕的滚动速度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下XML文本视图属性:

I have a text view with following XML attributes:

<TextView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="14dip"
    android:maxLines="1"
    android:scrollHorizontally="true"
    android:ellipsize="marquee"
    android:focusable="true"
    android:focusableInTouchMode="true"
    android:marqueeRepeatLimit="1"
    android:textColor="@android:color/black"
    android:id="@+id/ticker"
    />

我希望能够设置水平滚动速度,使得它比默认的稍快。我该怎么做这个(在XML)?

I'd like to be able to set the horizontal scroll rate, making it slightly faster than the default. How do I do with this (in XML)?

请多关照。

推荐答案

我不认为有,你可以在XML中设置用于该目的的属性。

I don't think there's an attribute that you can set in XML for that purpose.

这可能是一个有点矫枉过正你,但看看这个定制的 扩展选取框Android版 ,所有的设置都可以在编码部分进行自定义,你需要动画的setDuration发挥,实现了速度,你想要的。

It might be a bit overkill for you, but check out this customized extended marquee for Android, all settings can be customized in the coding part, you need to play with setDuration of the animation to achieve the speed you want.

这篇关于Android和一个TextView的水平字幕的滚动速度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆