Widget如何实现文字滚动功能?
各位:
我要在widget上实现一个文字滚动的功能,在widget上有个TextView,在TextView(见下面的布局文件)上实现文字滚动,在Activity内的TextView可以实现文字滚动功能,但是不知道为什么在widget上却不行,哪位高手告知一下,不胜感激。
我的布局文件如下:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="280dp"
android:layout_height="123dp">
<ImageView android:id="@+id/imageview" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:src="@drawable/frame" />
<TextView android:id="@+id/textview" android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textColor="#F00"
android:textSize="25sp"
android:gravity="center"
android:scrollHorizontally="true"
android:singleLine="true"
android:ellipsize="marquee"
android:focusable="true"
android:marqueeRepeatLimit="marquee_forever"
android:focusableInTouchMode="true"
android:duplicateParentState="true"
/>
</FrameLayout>
我要在widget上实现一个文字滚动的功能,在widget上有个TextView,在TextView(见下面的布局文件)上实现文字滚动,在Activity内的TextView可以实现文字滚动功能,但是不知道为什么在widget上却不行,哪位高手告知一下,不胜感激。
我的布局文件如下:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="280dp"
android:layout_height="123dp">
<ImageView android:id="@+id/imageview" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:src="@drawable/frame" />
<TextView android:id="@+id/textview" android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textColor="#F00"
android:textSize="25sp"
android:gravity="center"
android:scrollHorizontally="true"
android:singleLine="true"
android:ellipsize="marquee"
android:focusable="true"
android:marqueeRepeatLimit="marquee_forever"
android:focusableInTouchMode="true"
android:duplicateParentState="true"
/>
</FrameLayout>
...全文


