1 需求
需要控件实现阴影效果
2 实现
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"android:background="@color/white"android:orientation="vertical"android:layout_width="match_parent"android:layout_height="match_parent"><LinearLayoutandroid:layout_marginTop="@dimen/dp_10"android:layout_marginStart="@dimen/dp_10"android:background="@drawable/bg_home_search_bar"android:elevation&