Android added a shadow effect in 5.0 primarily through CardView, which is implemented through Android.support.v7.widget.CardView in the lower version.
<relativelayout xmlns:android="Http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res/Package name"Android:id="@+id/rllistitemgame"Android:layout_width="Match_parent"android:layout_height="Wrap_content"android:paddingleft="8DP"android:paddingright="8DP"android:paddingtop="2DP"> <android. Support. V7. Widgets. CardViewAndroid:layout_width="Match_parent"android:layout_height="Wrap_content"App:cardbackgroundcolor="@android: Color/white"app:cardcornerradius="3DP"app:cardelevation="2DP"app:cardusecompatpadding="true">
You can see three more apps in the code above: properties, Cardcornerradius setting the fillet size, app:cardelevation setting the shadow size, the most important attribute is cardusecompatpadding, It defaults to true in systems below 5.0, but defaults to false in the 5.0 system, and if not set app:cardusecompatpadding= "true" will cause the shadow effect to not be visible on Android phones on the 5.0 system.
Finally, you must remember to add xmlns:app="http://schemas.android.com/apk/res/包名" this sentence.
By the way, attach the CardView compatible lib (Eclipse available) http://download.csdn.net/detail/zhong1113/8707351
Implementing CardView in Android