How to refill a ListView in android
listview = (ListView) findViewById(R.id.listView1);
listview.setAdapter(new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1, Names));
final String[] TempArray = new String[Names.length];
editText = (EditText) findViewById(R.id.editText1);
editText.addTextChangedListener(new TextWatcher()
{
public void onTextChanged(CharSequence s, int start, int before,
int count)
{
// TODO Auto-generated method
}
public void beforeTextChanged(CharSequence s, int start, int count,
int after)
{
// TODO Auto-generated method stub
}
public void afterTextChanged(Editable s)
{
// TODO Auto-generated method stub
}
});
That was my sample code. I want to refill the listview on public void onTextChanged(CharSequence s, int start, int int count) function.on onTextChanged function, i want to fill the listview with a new string array. how can i do this???