次のコードを見てください
<TableRow
android:id="@+id/tableRow13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5dp" >
<TextView
android:id="@+id/textView22"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#ffffff"
android:textSize="12sp"
android:text="@string/r_new_event"
android:layout_marginLeft="5dp"
android:textAppearance="?android:attr/textAppearanceSmall" />
<TextView
android:id="@+id/textView23"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Meeting with people i have never seen before in my entire life lol"
android:ellipsize="marquee"
android:maxLength="10"
android:singleLine="true"
android:fadingEdge="horizontal"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:textColor="#ffffff"
android:textSize="12sp"
android:layout_marginLeft="10dp"
android:textAppearance="?android:attr/textAppearanceSmall" />
</TableRow>
この試みは、テキストが 10 文字を超える場合にマーキー化することです。残念ながら、このコードは機能しません。mothエミュレーターとAndroidフォンで試してみました。ここで何が問題なのですか?
アップデート
以下は私の新しいコードですが、まだ機能していません
<TextView
android:id="@+id/textView23"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Meeting with people i have never seen before in my entire life lol"
android:ellipsize="marquee"
android:maxLength="10"
android:singleLine="true"
android:fadingEdge="horizontal"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:textColor="#ffffff"
android:textSize="12sp"
android:layout_marginLeft="10dp"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:textAppearance="?android:attr/textAppearanceSmall" />