如何在android中重新填充ListView
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
}
});
那是我的示例代码。我想在 public void onTextChanged(CharSequence s, int start, int int count)函数上重新填充列表视图。在 onTextChanged 函数上,我想用新的字符串数组填充列表视图。我怎样才能做到这一点???