brelto85 Active Member Licensed User Longtime User Oct 8, 2014 #1 How to add the shade of a panels like the image attached? I tried to do this with this solution: Code: Copy Dim ivShadow As ImageView ivShadow.Initialize("") ivShadow.Background = LoadDrawable("code_lock_bottom") Panel1.AddView(ivShadow, 0, 0, 100%x, 5dip) That method isn't the best solution because with different smartphone's resolutions, the position of code_lock_bottom must be changed to view it I tried also with a 9-patch method but i don't understand how it works and if permits to add the shade under the panel There's a standard method that follow the official guidelines? Attachments Screenshot_2014-10-08-22-43-47.png 112.9 KB · Views: 647
How to add the shade of a panels like the image attached? I tried to do this with this solution: Code: Copy Dim ivShadow As ImageView ivShadow.Initialize("") ivShadow.Background = LoadDrawable("code_lock_bottom") Panel1.AddView(ivShadow, 0, 0, 100%x, 5dip) That method isn't the best solution because with different smartphone's resolutions, the position of code_lock_bottom must be changed to view it I tried also with a 9-patch method but i don't understand how it works and if permits to add the shade under the panel There's a standard method that follow the official guidelines?
Erel B4X founder Staff member Licensed User Longtime User Oct 9, 2014 #2 You need to use a 9 patch image as the panel background. You can try this image: http://droiddudes.com/easy-drop-shadow/ Upvote 0
You need to use a 9 patch image as the panel background. You can try this image: http://droiddudes.com/easy-drop-shadow/