• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Do you know how to get more than three colors with XML drawable for a gradient?

There are two ways
1. Create 5 or more drawables with different gradients. Place them vertically next each to other. If their colors will be consistent, you get smooth transition between them.
2. Place 5 or more drawables one behind other and set transparency of each to, say, 10%. So you can see all of them and get the mix of all.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones