Updating an ArrayAdapter for a list view
ArrayListAnd that takes care of that!newData = new ArrayList (Arrays.asList(jsonString)); myData.clear(); myData.addAll(newData); myArrayAdapter.notifyDataSetChanged();
ACTION BAR IN SETTINGS ACTIVITY
Typically, Settings activity extends a Preference Activity. However, for easy addition of the action bar, activities extend the ActionBar activity. You cannot extend more than one class in Java which means that if you are using the Preference activity method you will have to find a hack to hook up the action bar to your Settings activity. There a few workarounds.If you are targeting android 3.0 and above (quite frankly, I see very little reason why you would be targeting anything less) then you should use PreferenceFragments and attach it to an activity which extends ActionBar activity. A description is given here in the android Docs.
If you are still bent on supporting other devices,..., well I have not figured that out yet. When I do will let you know. If you have please do post a comment.
No comments:
Post a Comment