Rectangle_with_10dp_radius_white_bg_and_shadow.xml 9.png file (example: my_background.9.png)Īn even better and less hard working solution is to use a CardView and set app:cardPreventCornerOverlap="false" to prevent views to overlap the borders: Īlso make sure to have included the latest version in the adle, current is compile ':cardview-v7:26.0.0'īut if you want to support under v21, here are my achievements.
For newer versions: if you want to have your own custom shape, I suggest to use a drawing software like Photoshop and draw it.ĭon't forget to save it as.
The option above is for the older versions of Android Studio so you may not find it. I know this question has already been answered but I want you to know that I found a drawable on Android Studio that is very similar to the pics you have in the question: