我想將影子添加到Toolbar
但它重疊ListView
的項目。 如何讓它透明?影子重疊列表查看
這裏底部陰影重疊列表項。 我使用View
9補丁繪製的陰影:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/white">
...
</android.support.v7.widget.Toolbar>
<View
android:layout_width="match_parent"
android:layout_height="4dp"
android:background="@drawable/bottom_shadow" />
</LinearLayout>
我想用透明背景
怎麼樣'@android:彩色/ transparent'顏色 –
如果你不想陰影,直接將其移除。使用'android:background =「@ drawable/bottom_shadow」' –
顯示'bottom_shadow'的代碼 – Mangesh