i just try to add an shadow to my View and i test many methods i found in stackoverflow and google none of them make shadow like elevation
but i faced an problem when i test my app in kitkat i did't see any shadow so what the solution for this use drawable as shadow not give effect like elevation
some of code i used for make shadow but as i said its effect different of elevation
<shape android:shape="rectangle"
xmlns:android="http://schemas.android.com/apk/res/android">
<gradient android:startColor="@android:color/transparent"
android:endColor="@color/black_alpha_12" android:angle="90.0" />
</shape>
and
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="#BDBDBD"/>
<corners android:radius="5dp"/>
</shape>
</item>
<item
android:left="0dp"
android:right="0dp"
android:top="0dp"
android:bottom="2dp">
<shape android:shape="rectangle">
<solid android:color="#ffffff"/>
<corners android:radius="5dp"/>
</shape>
</item>
</layer-list>
and more and more code i test its like a line not a shadow only elevation
give to me the best shadow
at the end this is my gradle
compileSdkVersion 25
buildToolsVersion "23.0.0"
defaultConfig {
applicationId "blabla.mmmmmm.com"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
so i just need an method for made an shadow just like elevation
shadow needed like this image