Hi william ,
Your activity will be extending ListActivity I guess. In that case u would have used
Using java Syntax Highlighting
setListAdapter(myAdapter) ;
Parsed in 0.029 seconds, using
GeSHi 1.0.8.4
In ur myAdapter class , u would have a getView() method. U can set some boolean variable in the Adapter class and invoke the onContentChanged() method in ListActivity.
For example,
Using java Syntax Highlighting
class MyAdapter extends BaseAdapter{
private boolean loadNewView = false;
..............................
.................................
public View getView(int position, View convertView, ViewGroup parent) {
View view = null;
if(loadNewView){
view = ............... ;
}
else{
view = ................;
}
return view;
}
public void setLoadNewView(boolean b){
loadNewView = b;
}
}
Parsed in 0.032 seconds, using
GeSHi 1.0.8.4
Then, u could use the following to do any update to the ListView :
Using java Syntax Highlighting
ListActivity app = yourListActivity;
myAdapter.setLoadNewView(true);
app.onContentChanged();
Parsed in 0.033 seconds, using
GeSHi 1.0.8.4