Reputation: 2959
i am trying to develop this app in android that has 3-4 buttons and a list being displayed below them. each button when clicked must reload the list with new contents based on which button was clicked. each row in the list has a picture and two lines of text. could some one please suggest me how do I perform the reloading part.
Upvotes: 0
Views: 558
Reputation: 6177
Attach the new adapter, with updated elements, with the listView, it will work as reloading the list view......
Upvotes: 1
Reputation: 114
You could grab the list, in whatever layout it is in (ex LinearLayout) by doing a:
LinearLayout ll = (LinearLayout)getViewById(R.id.thislayout)
Remove the elements from the list as you desire using:
ll.removeView(view);
edit the view object as you want (changing the source etc) then re-add it to the LinearLayout using:
ll.addView(view);
Upvotes: 0