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);
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.