Android : SharedPreferences with custom addition

on Sunday, August 31, 2014


I was browsing through the net about SharedPreferences and I came across something that I've never seen in a SharedPreferences statement.


I wonder if anyone could explain to me what this means:



Editor editor = sPrefs.edit();
if(editText1CheckBox.isChecked){
editor.putBoolean("STRING_NAME"+(a+100)+(b+100), false);
}else {
editor.putBoolean("STRING_NAME"+(a+100)+(b+100), true);
}


So I would appreciate if anyone could explain to mean what does the (a+100) and (b+100) means? What if it was a different variable/number? What does it mean?


Thanks.


0 comments:

Post a Comment