Basically I want when I uncheck the box on the first item, the second item is "greyed out" and unclickable, or disabled.
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
if(position == 0) {
//disable.enable push
CheckBox checkBox = (CheckBox) mRoot.findViewById(R.id.cbRowCheckBox);
checkBox.setChecked(!checkBox.isChecked());
mPushEnabled = checkBox.isChecked();
if (mPushEnabled) {
//code for push enabled
//code to let position 1 enabled, i was thinking something along th e lines,
adapter.getposition(1).setEnabled(true);
} else {
//code for push disabled
adapter.getposition(1).setEnabled(false);
}
} else if(position == 1) {
//push notification settings
//open intent
}
}
I was thinking that I could get the position of where the item is and just set it false to setEnabled()
. Is that the right way? If so, I can't figure out how to target the item. If now, what's the best way?