Вопрос

Why abnormal square block appears on the edge of textview ?

when it has

  • Marquee enabled with fading edge.
  • The text view is set transparent.

TextView defination

    <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 property

TextView textView = (TextView) findViewById(R.id.mytext);
textView.setAlpha(0.7f);

This problem is not seen on android 4.1 but it's present on android 4.2 onwards if fading edge is enabled.

Это было полезно?

Решение

After further research it was bug in android framework after uploading below change it is resolved. https://android-review.googlesource.com/#/c/69101/

The issue is no longer appear in latest version of android.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top