Pendrush Well-Known Member Licensed User Longtime User Dec 23, 2015 #1 Code: Copy 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 SimpleMaterial.zip 21.7 KB · Views: 286
Code: Copy 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?
eurojam Well-Known Member Licensed User Longtime User Dec 23, 2015 #2 did you try it with colordrawable and background? something like this: Code: Copy 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
did you try it with colordrawable and background? something like this: Code: Copy 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 ...
Pendrush Well-Known Member Licensed User Longtime User Dec 23, 2015 #3 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
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.
Erel B4X founder Staff member Licensed User Longtime User Dec 23, 2015 #4 It looks like a bug in Android. Might be related to this: https://code.google.com/p/android/issues/detail?id=78248 As a workaround you can use SetColorAnimated with a duration of 1 (1ms) to change the color: Code: Copy Panel1.SetColorAnimated(1, 0, Colors.Yellow) Upvote 0
It looks like a bug in Android. Might be related to this: https://code.google.com/p/android/issues/detail?id=78248 As a workaround you can use SetColorAnimated with a duration of 1 (1ms) to change the color: Code: Copy Panel1.SetColorAnimated(1, 0, Colors.Yellow)
Pendrush Well-Known Member Licensed User Longtime User Dec 23, 2015 #5 I have try everything but SetColorAnimated. Thank you. Upvote 0