I am trying to implement the get color method for the cwac color mixer( https://github.com/commonsguy/cwac-colormixer), but every time this code runs I get a NullPointerException
:
int color = 1;
public void openColor(){
ColorMixer mixer = (ColorMixer)findViewById(R.id.mixer);
if (color!=1){
mixer.setColor(color);
}
color = mixer.getColor();
}
The color = mixer.getColor();
is the line that crashes.