Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Blurred background image in a LinearLayout

I saw this effect in an app named "Umano" (picture below). The background image is (I assume) loaded from a URL and added as a background to the layout BUT blurred as you can see. How can I change my code (given below) such that i can achieve this effect?

Image Link here

My XML:

<LinearLayout
       android:id="@+id/dragView"
       android:layout_width="match_parent"
       android:layout_height="match_parent"
       android:background="#eeeeee"
       android:clickable="true"
       android:focusable="false"
       android:orientation="vertical" >

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="68dp"
                android:orientation="horizontal" >

                <TextView
                    android:id="@+id/name"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:gravity="center_vertical"
                    android:paddingLeft="10dp"
                    android:text="Product Details"
                    android:textSize="14sp" />
             </LinearLayout>
</LinearLayout>
like image 698
Nehara Ranathunga Avatar asked Dec 12 '25 11:12

Nehara Ranathunga


1 Answers

You can obtain blurred images using Renderscript.

Here's an official tutorial.

like image 177
bonnyz Avatar answered Dec 14 '25 00:12

bonnyz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!