Pregunta

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.

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top