I used ListView to dynamic add item,but there is a problem about not Smooth add.
there are textView and button in my listActivity,Iwant to Press button ,then
Is your getBtnClickListener method part of the ListActivity or ArrayAdapter class?
For me, when I update from the ListActivity class, I use this code...
// code to add a Contact to my database
// code to add a Contact to the list that
// that is used by the ListView
setListAdapter(adapter);
getListView().setTextFilterEnabled(true);
When I am updating from a method inside the ArrayAdapter class, I use this code...
// from a LongPress on a ListView item
convertView.setOnLongClickListener(new OnLongClickListener(){
@Override
public boolean onLongClick(View view) {
view.performHapticFeedback(0, View.HAPTIC_FEEDBACK_ENABLED);
// code to remove a Contact name from my database
// code to remove that Contact name from my list
// that is used by the ListView
ContactsAdapter.this.notifyDataSetChanged();
return true;
});