Android Question Material design - Elevation

Pendrush

Well-Known Member
Licensed User
Longtime User
B4X:
Panel1.Color = Colors.Yellow ' <- comment this line
Panel1.Elevation = 10dip

If I comment line Panel1.Color = Colors.Yellow, then panel get elevation.
When I try to change panel.color, panel don't accept elevation.
Tested on Nexus 5 android 6.0.1.
I actuality need to change panel color with some elevation, anyone know how?
 

Attachments

  • SimpleMaterial.zip
    21.7 KB · Views: 178

eurojam

Well-Known Member
Licensed User
Longtime User
did you try it with colordrawable and background? something like this:
B4X:
    Dim cd As ColorDrawable
    cd.Initialize(Colors.Yellow,0dip)
    p.Background = cd
I haven't tried this, because I have an old version of B4A ...:(
 
Upvote 0

Pendrush

Well-Known Member
Licensed User
Longtime User
Yes, but effect is the same, after color changing, panel lost shadow, but when i try Log (Panel1.Elevation) I can see that elevation is set, but no shadow at all.
 
Upvote 0
Top