Blur Mask Filters are not supported

602 Views Asked by At

I have one custom class which extends View class and in which i am just drawing some custom Bitmaps. Now problem is whenever i am using that class in xml, it creates rendering problem.

Here is my XML code :

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <com.custom.DrawingView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>

</RelativeLayout>

There is nothing else i am using in xml but still error is there, i am also sharing screenshot for it, check below.

enter image description here

In my custom View class i have used BlurMaskFilter also

BlurMaskFilter blurMaskFilter = new BlurMaskFilter(5,
            BlurMaskFilter.Blur.NORMAL);

As you can see, i am not able to see preview of my layout and not even Component Tree.

Configuration :

Android studio : 2.1.3
classpath 'com.android.tools.build:gradle:2.1.3'

compileSdkVersion 24
buildToolsVersion "24.0.0"
1

There are 1 best solutions below

0
On

Set android:hardwareAccelerated="false" on your activity inAndroidManifest.xml like this:

 <activity android:name=".MyActivity" android:hardwareAccelerated="false">

It works fine for me.