How can I create a border (gradient from #color1 to transparent) around the activity using XML styles? Please see the image below.

With plain XML this is not possible (as far as I know). But you can use the 9-patch images in order to do this. Just create one with the Draw-9-patch tool from the sdk.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With