Tag: exception-handling

IndexOutOfBoundsException SharedPreferences

问题内容: I read many posts even though I didn’t get the solution.My Scenario is, In My activity1 (first activity of tabhost) , I have a shared preferences in which I have stored a string set as, Set<String> arr = new HashSet<String>(); arr.add("term"); arr.add(((EditText) scrollView.findViewById(R.id.loan)).getText().toString()); arr.add(((EditText) scrollView.findViewById(R.id.emi)).getText().toString()); arr.add(((EditText) scrollView.findViewById(R.id.interest)).getText().toString()); SharedPreferences.Editor edit = savedloan.edit(); edit.putStringSet(input.getText().toString(), arr);//String in