I have two spinners, spinner A and spinner B. When the user changes A, B gets updated with a full new set of data. I also implemented a callback for B to use setOnItemSelectedListener so that I can modify some objects in another class whenever B is changed by the user.
B.setOnItemSelectedListener(new OnItemSelectedListener() {
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
mComponentColor.setSelection(position);
mCompColorAsBuilt[mComponent.getComponentSelection()] = position;
setColor();
}
});
The problem I've ran into is that I really don't want these objects to change unless the user was the one who changed the spinner. Because I automatically populate B based on A's selection, B's callback is invoked when the users changes A.
Any thoughts how I could deal with this situation?