xpepermint
xpepermint

Reputation: 36273

Android: Border as gradient

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

enter image description here

Upvotes: 3

Views: 3743

Answers (2)

Drejc
Drejc

Reputation: 14286

You can do it with and tags as special drawables. Take a look at this example.

Upvotes: 0

Franziskus Karsunke
Franziskus Karsunke

Reputation: 5208

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.

Upvotes: 3

Related Questions