i was working with ListView in android,so to insert items into the list with a button i did the following :created arraylist,arrayadapter,set the adapter to arraylist and used the following code :
addButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
listItems.add(editText.getText().toString());
adapter.notifyDataSetChanged();
}
});
this works fine but i also found that there is a method called insert for the ArrayAdapter so what is the difference between inserting into ArrayAdapter and adding into arrayList ?
PS :im new to this adapter concept can exlpain it to me ? thanks.