You dont compare string with ==
. Use this:
if(text.equals("Hue"))
{
}
So your code goes this way:
spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {
Object item = parent.getItemAtPosition(pos);
String Text = effecttwo.getSelectedItem().toString();
System.out.println("spinner is -"+item+"-");
// I get the correct values in System.out.println
if(text.equals("Hue")){
// not entering into this condition or any other condition
}else if(text.equals("Saturation")){
}else if(text.equals("Brightness")){
}else{
}
}
public void onNothingSelected(AdapterView<?> parent) {
}
});