Build a Palette of Colors
In this section, we’ll build a palette using a list of colors, or a color array,[74] as shown in the figure. The color determined by the device orientation on the top half of the screen and the palette of saved colors at the bottom. When you see a color you like, you’ll be able to store it as one of eight swatches on the screen. In our example, we are dealing with a color array and we want to store a list of colors in a palette[] array. Each data/color entry in the list is identified by an index number that represents the position in the array. The first element is identified by the index number, [0]; the second element, ...
Get Rapid Android Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.