I have an ArrayList that is being read from a Text file. The array list is being displayed in a ListView. I can add and Remove items from the arraylist without an issue. I have an issue however, where the application just crashes when ever I try to modify the ArrayList. Here is the code I'm using to modify the arrayList.
input2 = (EditText) promptView.findViewById(R.id.userInput);
input2.setText(array.get(id).toString());
alertDialogBuilder.setCancelable(false).setPositiveButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
String value2 = input2.getText().toString();
array.set(id, value2.toString());
adapter.notifyDataSetChanged();
}
})
LogCat only reports an "ArrayIndexOutOfBoundsException" error. What am I doing wrong?