简体   繁体   English

android:scrollHorizo​​ntally不适用于Samsung Galaxy Nexus

[英]android:scrollHorizontally not working on Samsung Galaxy Nexus

In my music player application, I have got a TextView with Artist, Title and so on, which is scrolling horizontally in the View. 在我的音乐播放器应用程序中,我有一个包含Artist,Title等的TextView,它在View中水平滚动。 (Like the old html marquee tag). (就像旧的html marquee标记一样)。 It works on Android 2.3.4 on Xperia Arc but doesn't work on Samsung Galaxy Nexus (The Text is just displayed and not scrolling). 它可以在Xperia Arc上的Android 2.3.4上运行,但不能在Samsung Galaxy Nexus上运行(文本仅显示而不滚动)。 The TextView is defined like this. TextView是这样定义的。 In the code it is just set with the matching Songtext. 在代码中,仅使用匹配的Songtext进行设置。

    <TextView
        android:id="@+id/songArtist"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:ellipsize="marquee"
        android:focusable="true"
        android:focusableInTouchMode="true"
        android:marqueeRepeatLimit="marquee_forever"
        android:scrollHorizontally="true"
        android:textColor="#FFFFFA" /

I found a way - adding: 我找到了一种方法-添加:

        android:singleLine="true"

does the trick... 绝招...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM