I am having this two array; one is Int type and another is string type:
int[] COLOURS = { Color.CYAN, Color.BLUE, Color.GREEN, Color.YELLOW,
Color.MAGENTA, Color.RED };
String[] color = { "#ff0000","#ff0f00" ,"#ffff00"};
I am using this code to set color from the Integer array to the background of a view according to value of progress:
@Override
public void onProgressChanged(SeekBar seekBar, int progress,
boolean fromUser) {
full_page.setBackgroundColor(COLOURS[progress]);
}
But I need to set color from the string array, from this one:
String[] color = { "#ff0000","#ff0f00" ,"#ffff00"};
but this is showing error in my code.