textview の端に異常な四角いブロックが表示されるのはなぜですか?
あるとき
- フェージング エッジを有効にしたマーキー。
- テキスト ビューは透明に設定されます。
TextView 定義
<TextView
android:id="@+id/mytext"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:text="@string/hello_world"
android:singleLine="true"
android:textSize="55sp" />
TextView プロパティ
TextView textView = (TextView) findViewById(R.id.mytext);
textView.setAlpha(0.7f);
この問題は Android 4.1 では発生しませんが、フェージング エッジが有効になっている場合、Android 4.2 以降では発生します。