0

I need to make blur overlay on text or image views. Is there a google official solution for that?

P.S. or you might share good solution you used

I have checked this topic already Android Blur View (Blur background behind the view)

Bo Z
  • 2,359
  • 1
  • 13
  • 31

1 Answers1

0

The easiest way of making textView blur is :

textView= itemView.findViewById(R.id.layout_id);

        if (Build.VERSION.SDK_INT >= 11) {
            textView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
        }
        float radius = textView.getTextSize() / 3;
        BlurMaskFilter filter = new BlurMaskFilter(radius, BlurMaskFilter.Blur.NORMAL);
        textView.getPaint().setMaskFilter(filter);
Bo Z
  • 2,359
  • 1
  • 13
  • 31