I\'m facing a small problem with the LinearGradient definition in XML. What I want is to use the constructor that accepts the array of colors and the array of positions.
+1 for ErickPetru's answer. Although I'd like to mention that there is one more feature available: One cannot only specify the centerColor, but also a center offset, which allows for some more flexibility and sometimes helps to avoid the necessity for Java coding.