I've cut all the fat out of my problem. Could anyone tell me why the list isn't updating with the new values? I've tried all the refresh commands, perhaps there's something i'm missing?
public class DropboxFragment extends ListFragment {
String[] values;
ArrayAdapter<String> adapter;
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
values = new String[] { "Android", "iPhone", "WindowsMobile",
"Blackberry", "WebOS", "Ubuntu", "Windows7", "Max OS X",
"Linux", "OS/2" };
adapter = new ArrayAdapter<String>(getActivity(),
android.R.layout.simple_list_item_1, values);
setListAdapter(adapter);
}
@Override
public void onListItemClick(ListView l, View v, int position, long id) {
values = new String[] { "IT", "WORKED"};
l.invalidateViews();
adapter.notifyDataSetChanged();
l.refreshDrawableState();
}
}