I'm using SharedPreferences
to store the choice between 2 checkboxes
.
It works but now I want that if the value is = 0 must be started my method, if it is equal to 1 is to be launched another method. I created a simple "if" but the method is not launched. Do you have any idea how to do?
sharedPreference = PreferenceManager.getDefaultSharedPreferences(getActivity());
Integer value = sharedPreference.getInt(SELECTED_ITEM, -1);
Log.d("va", "value: "+value);
if (value.equals(0)){
}else{
}