i am trying to coding the below image for android app design, i can not get shadow as same as image how i can do it perfectly? and can control with opacity, degree and color of shadow?
Asked
Active
Viewed 95 times
-3
-
Possible duplicate of [Android LinearLayout : Add border with shadow around a linearLayout](https://stackoverflow.com/questions/24095223/android-linearlayout-add-border-with-shadow-around-a-linearlayout). – Jul 29 '18 at 10:08
-
Possible duplicate of [Android LinearLayout : Add border with shadow around a linearLayout](https://stackoverflow.com/questions/24095223/android-linearlayout-add-border-with-shadow-around-a-linearlayout) – Jul 29 '18 at 10:08
1 Answers
0
You can use cardView which has an elevation attribute which gives shadows to your card view.
also there are third party libraries which you can use like this:
https://github.com/loopeer/shadow
also here is Google documentation which describes how you should use shadows in your ui:
https://developer.android.com/training/material/shadows-clipping

Jason Aller
- 3,541
- 28
- 38
- 38

Amir Hossein Mirzaei
- 2,325
- 1
- 9
- 17