ListView - add/remove items dynamically


Last Updated:

  1. Ristar

    Ristar Member This Topic's Starter

    Joined:
    Jul 22, 2012
    Messages:
    8
    Likes Received:
    0
    how to dynamically add/remove items to a ListView and display it?

    how to put a list of items (that can be clicked), and put a list of CheckBoxes?
     

    Advertisement
  2. jonbonazza

    jonbonazza Well-Known Member

    Joined:
    Jul 13, 2010
    Messages:
    1,934
    Likes Received:
    458
    1) To add/remove items to/from a ListView, you need to create subclass an Adapter (most of the time, you would subclass ArrayAdapter) and override the getView() method.

    2) create an XML layout file that visualizes your list item.
     

Share This Page

Loading...