Now, this can be additional am fond of it. when such a big amount of looking, I stumbled upon Folkert’s codewhereby he was ready to produce gradient buttons in robot victimisation simply XML. That’s right! XML! Ine'er liked having to form a coloured button in robot employing a nine patch image. it's a trouble.
No matter what different developers say however simple it's to form a nine patch image, doing it in XML is healthier. it's simply a matter of copy-paste right? The sample codes for these gradient buttons contain solely 2 color gradients.
The robot SDK permits a 3rd color except for these XML codes, Folkert used solely a pair of colours. Now, it’s bye bye to those uninteresting grey default robot buttons.
Here are the XML codes:
All these buttons have the same text style so define a style in strings.xml:
And use it like this