我在名为“Umano”的应用程序中看到了这种效果(下图)。背景图像(我假设)是从 URL 加载的,并作为背景添加到布局中,但如您所见,它是模糊的。我怎样才能更改我的代码(如下所示)以达到这种效果?
我的 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>
最佳答案
您可以使用 Renderscript 获得模糊图像.
Here's官方教程。
关于java - LinearLayout 中的模糊背景图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27985258/