以下の問題を修正しました。簡単な変更。 android:lines="1"
をandroid:singleLine="true"
に置き換えました。Android 4.0(ISO)ウィジェットでTextViewマーキーが機能しない
現在、私のアプリはマーキーとしてウィジェットのテキストを表示しています。 4.0バージョン以外のすべてのAndroid OSで期待どおりに動作しています。 APIレベル14のエミュレータでテストしましたが、テキストはスクロールしません(マーキー)。以下は、マーキーエフェクトのテキストを表示するために使用されるレイアウトxmlです。
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:id="@+id/tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:lines="1"
android:background="@android:color/background_dark"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:textColor="@android:color/white"
android:focusable="true"
android:focusableInTouchMode="true"
android:duplicateParentState="true"
android:textSize="20dp">
<requestFocus android:focusable="true" android:focusableInTouchMode="true"
android:duplicateParentState="true" />
</TextView>
</RelativeLayout>
この問題を解決するお手伝いをしてください。
ありがとうございます。
あなたのソリューションを下に追加し、それを受け入れ可能なものとしてマークすることができます。そうでなければ、質問を削除できます。 –
私は以下の問題を修正しました。簡単な変更。 Android:lines = "1"をandroid:singleLine = "true"に置き換えました。 – sharmi