我特林使阴影周围的LinearLayout像使图像的下方(上方):如何在LinearLayout周围制作阴影?
我真的使用层列表与形状,而是由白色区域中的所有底部阴影owerlapping(见上文图像) 。所有这些视图看起来像:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@android:color/transparent" >
<LinearLayout
android:id="@+id/listView_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="45dp"
android:background="@color/text_white">
<!-- ListView to be shown on widget -->
<ListView
android:id="@+id/listViewWidget"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<!-- Empty view is show if list items are empty -->
<TextView
android:id="@+id/empty_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:textColor="#ffffff"
android:textSize="20sp"
android:visibility="gone" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:id="@+id/widget_toolbar"
android:orientation="vertical"
android:background="@drawable/layout_card_view"/>
</FrameLayout>
如何做到这一点?使用可绘制
不幸的是,它不是合适的 –