Android 在文本视图中,用选框标记不';不要开始循环

Android 在文本视图中,用选框标记不';不要开始循环,android,marquee,Android,Marquee,我有一个大布局和一个虚拟布局,其中只有文本视图。这两种情况下的文本视图小部件是相同的,但当放在更复杂的布局中时,它不起作用 这个帐篷有什么限制吗 <TextView android:id="@+id/txt_id" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ellipsize="marquee" android:marqueeRep

我有一个大布局和一个虚拟布局,其中只有文本视图。这两种情况下的文本视图小部件是相同的,但当放在更复杂的布局中时,它不起作用

这个帐篷有什么限制吗

<TextView
    android:id="@+id/txt_id"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:ellipsize="marquee"
    android:marqueeRepeatLimit="marquee_forever"
    android:singleLine="true"
    android:text="a sdasd as das d as d asd a sd as d a sd as d as das d a sd a" >
</TextView>

在我的例子中,
android:focusable=“true
”和
android:focusableInTouchMode=“true”
使测试循环:

<TextView
    android:id="@+id/txt_id"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:ellipsize="marquee"
    android:focusable="true"
    android:focusableInTouchMode="true"
    android:marqueeRepeatLimit="marquee_forever"
    android:maxLines="1"
    android:scrollHorizontally="true"
    android:singleLine="true"
    android:text="some long text">
</TextView>

在我的例子中,
android:focusable=“true
”和
android:focusableInTouchMode=“true”
使测试循环:

<TextView
    android:id="@+id/txt_id"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:ellipsize="marquee"
    android:focusable="true"
    android:focusableInTouchMode="true"
    android:marqueeRepeatLimit="marquee_forever"
    android:maxLines="1"
    android:scrollHorizontally="true"
    android:singleLine="true"
    android:text="some long text">
</TextView>

试试这个:

<TextView
            android:id="@+id/txt_id"
            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:singleLine="true"
            android:text="a sdasd as das d as d asd a sd as d a sd as d as das d a sd a" >
        </TextView>

试试这个:

<TextView
            android:id="@+id/txt_id"
            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:singleLine="true"
            android:text="a sdasd as das d as d asd a sd as d a sd as d as das d a sd a" >
        </TextView>

这里有另一种实现marque的方法。这对我来说非常有效

将其用作文本视图

 <com.example.marque_test.marque_textView
        android:id="@+id/TV_FOOTER"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
         android:fadingEdge="horizontal"
           android:scrollHorizontally="true"
           android:text="a sdasd as das d as d asd a sd as d a sd as d as das d a sd a"
        android:ellipsize="marquee"
        android:focusable="true"
        android:focusableInTouchMode="true"
        android:gravity="center"
        android:marqueeRepeatLimit="marquee_forever"
        android:singleLine="true"
        />

这里有另一种实现marque的方法。这对我来说非常有效

将其用作文本视图

 <com.example.marque_test.marque_textView
        android:id="@+id/TV_FOOTER"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
         android:fadingEdge="horizontal"
           android:scrollHorizontally="true"
           android:text="a sdasd as das d as d asd a sd as d a sd as d as das d a sd a"
        android:ellipsize="marquee"
        android:focusable="true"
        android:focusableInTouchMode="true"
        android:gravity="center"
        android:marqueeRepeatLimit="marquee_forever"
        android:singleLine="true"
        />

我试过了,但没有解决问题。在我的虚拟项目中,一切正常,但当我将这个textview小部件放在更复杂的布局结构中时,它就不工作了。我尝试了这个方法,但它并没有解决问题。在我的虚拟项目中,一切正常,但当我将这个textview小部件放在更复杂的布局结构中时,它就不工作了