简体   繁体   中英

Android TextView blur is strange

I blur TextView with code

    rowTitle.setText("Some");
    rowTitle2.setText("(City)");
    //rowTitle.setText("Some title");
    //rowTitle2.setText("(City)");

    radius = rowTitle.getTextSize() / 3;
    filter = new BlurMaskFilter(radius, BlurMaskFilter.Blur.NORMAL);
    rowTitle.setLayerType(View.LAYER_TYPE_HARDWARE, null);
    rowTitle.getPaint().setMaskFilter(filter);

With text "Some" 在此处输入图片说明

With text "Some title" 在此处输入图片说明

  1. Why blur not all text (pic1 and pic2)?
  2. Why blur second TextView (pic2)?

All works good if remove

<TextView
    android:textAppearance="?android:textAppearanceMedium"
/>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM