簡體   English   中英

android:scrollHorizo​​ntally不適用於Samsung Galaxy Nexus

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

在我的音樂播放器應用程序中,我有一個包含Artist,Title等的TextView,它在View中水平滾動。 (就像舊的html marquee標記一樣)。 它可以在Xperia Arc上的Android 2.3.4上運行,但不能在Samsung Galaxy Nexus上運行(文本僅顯示而不滾動)。 TextView是這樣定義的。 在代碼中,僅使用匹配的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" /

我找到了一種方法-添加:

        android:singleLine="true"

絕招...

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM