android 如何让appwidget 里面设置TextView 滚动,android widget marquee text

来源:互联网 发布:经济发展数据库 编辑:程序博客网 时间:2024/06/05 08:23

        <TextView            android:id="@+id/title"            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:textColor="@color/appwidget_text"            android:textStyle="bold"            android:textSize="18sp"            android:singleLine="true"            android:fadingEdge="horizontal"            android:fadingEdgeLength="10dip"            android:ellipsize="marquee"            android:marqueeRepeatLimit ="marquee_forever"            android:focusable="true"            android:focusableInTouchMode="true"            android:duplicateParentState="true">            <requestFocus android:focusable="true"                 android:focusableInTouchMode="true"        android:duplicateParentState="true" />            </TextView>

text要想自动滚动,首先条件是要Select = true,但是在RemoteView 里面无法设置,所以只能在xml里面下功夫,主要代码是要设置focus


0 0
原创粉丝点击