1. Links
Https://github.com/Devlight/ShadowLayout
2. Effects
3.code
Compile ' com.github.devlight.shadowlayout:library:1.0.2 '
<com.gigamole.library.shadowlayout android:layout_width = "Wrap_ Content " android:layout_height =" Wrap_content " App:sl_shadow_angle = "2" App:sl_shadow_color = "#000" Android:id =" @+id/sl " app:sl_shadow_distance =" 5DP " App:sl_shadow_radius = "1DP" App:sl_shadowed= "true" > <imageview android:layout_width = "100DP" Android:id = "@+id/ls" android:layout_height= "100DP" android:src = "@mipmap/menu_stick"/> </com.gigamole.lib Rary. Shadowlayout>
Final Shadowlayout shadowlayout = (shadowlayout) Findviewbyid (R.ID.SL); Shadowlayout.setisshadowed (true); Shadowlayout.setshadowangle (45); // Shadow Angle Shadowlayout.setshadowradius (20); // Shadow Radius Shadowlayout.setshadowdistance (30); // Shadow distance Shadowlayout.setshadowcolor (Color.dkgray); // Shadow color
Android gives ImageView, text, etc. with Shadow [record]