Sweep Gradient : What it is and its examples

Viewed 13964

I came across Sweep Gradient on Android and was intrigued if it could give me a better control over the Color spacing and transitions. Did a quick search and found almost nothing about it!!

The only few references I found (and they do not meet the criteria of coming even close to explaining it properly or comprehensively) are listed below :

So thats almost about it. Others are similar or disparagingly brief.


Few conclusions I have drawn so far (and maybe are wrong) :

  • Sweep Gradient are mainly used for Rings
  • They are used for similar transactions as the Angular sweep (not sure about this one) which talks about transaction similar to sweep of a clock's hand.
  • Very similar to Linear Gradients. The only thing I can think about for a difference between them is for the usage (like Rings).
  • Sweep deals with Center (again a strong reference towards the clock theory)

I know people may consider this as not really a technical question. But for me to work with Sweep Gradients or atleast know what they mean, the description has to come from somewhere. And please do provide the answers with some examples of usage of Sweep in cases other than Rings.

2 Answers

For xml drawable this can be specified with

android:type="sweep"

android:type can have values(case-sensitive): linear, radial or sweep

Related