Go Back   Android Forums > Android Development > Application Development
Application Development Dev lounge for our application developers.

Get excited for the Samsung Galaxy S5! Find everything you need and discuss it in our Galaxy S5 Forum!

test: Reply
 
LinkBack Thread Tools
Old August 29th, 2012, 03:53 AM   #1 (permalink)
New Member
Thread Author (OP)
 
Join Date: Jul 2012
Posts: 8
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default ListView - add/remove items dynamically

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?

Ristar is offline  
Reply With Quote
sponsored links
Old August 29th, 2012, 11:48 AM   #2 (permalink)
Senior Member
 
jonbonazza's Avatar
 
Join Date: Jul 2010
Gender: Male
Posts: 1,936
 
Device(s): Nexus 4, Samsung Galaxy S II, HTC Evo 4G, Amazon Kindle Fire
Carrier: ATT

Thanks: 235
Thanked 478 Times in 292 Posts
Default

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.
jonbonazza is offline  
Reply With Quote
Reply


Go Back   Android Forums > Android Development > Application Development
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 12:32 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.