I have a EditText, ListView and Button.
My requirement is on click of the button, I wanted the text from edittext to append in the list.
- I want the code on button click.
 - I tried and I get unsupported error.
 
Can anybody help me in solving this issue?
I have a EditText, ListView and Button.
My requirement is on click of the button, I wanted the text from edittext to append in the list.
Can anybody help me in solving this issue?
Add this code to Activity.onCreate():
adapter = new ArrayAdapter<String>(getApplicationContext(), android.R.layout.simple_list_item_1);
listView.setAdapter(adapter);
Add this code to Button's OnClickListener:
String text = eidtText.getText().toString();
adapter.add(text);
adapter.notifyDataSetChanged();