1. Download our Official Android App: Forums for Android!

Apps ListView - add/remove items dynamically

Discussion in 'Android Development' started by Ristar, Aug 29, 2012.

  1. Ristar

    Ristar Lurker
    Thread Starter
    Rank:
    None
    Points:
    25
    Posts:
    8
    Joined:
    Jul 22, 2012

    Jul 22, 2012
    8
    0
    25
    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 Android Expert
    Rank:
    None
    Points:
    163
    Posts:
    1,930
    Joined:
    Jul 13, 2010

    Jul 13, 2010
    1,930
    457
    163
    Male
    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...