문제

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