我四处搜寻,找不到合适的方法.我想对我的观点产生以下阴影效果:


说实话,我不知道第二个是否通过应用阴影效果来完成.有任何想法吗?
如何为线性布局显示阴影.我想要白色圆形背景和线性布局周围的阴影.到目前为止我已经这样做了.请帮我.提前致谢.
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@xml/rounded_rect_shape"
android:orientation="vertical"
android:padding="10dp">
<-- My buttons, textviews, Imageviews go here -->
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
和xml目录下的rounded_rect_shape.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<solid android:color="#ffffff" />
<corners
android:bottomLeftRadius="3dp"
android:bottomRightRadius="3dp"
android:topLeftRadius="3dp"
android:topRightRadius="3dp" />
</shape>
Run Code Online (Sandbox Code Playgroud) 我想知道如何在android中的任何常规视图中添加阴影图层.例如:假设我有一个布局xml,显示这样的东西..
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="wrap_content"
<Button....
...
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
现在当它显示时,我希望它周围有一个阴影.