I have an Activity which I start like this:
public class MyProblemsActivity extends ListActivity
{
String[] PROBLEMS = new String[] {"One", "Two", "Three" };
ArrayAdapter adapter;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
adapter = new ArrayAdapter<String>(this,R.layout.my_problems, PROBLEMS);
setListAdapter(adapter);
ListView lv = getListView();
lv.setTextFilterEnabled(true);
and that works totally fine.
The problem I run into is after a call to a remote server via a Asynch call, I do this:
@Override
protected void onPostExecute(String result)
{
PROBLEMS = new String[] {"Hello", "Bye", "Hmmmmmm" };
adapter.notifyDataSetChanged();
}
But the screen does not update. What am I doing wrong here and how can I get the screen to update with the new values?
Thanks!!