August 30th, 2010, 02:36 PM
|
#1 (permalink)
|
|
New Member
Thread Author (OP)
Join Date: Aug 2010
Posts: 1
Device(s):
Carrier: Not Provided
Thanks: 0
Thanked 0 Times in 0 Posts
|
Arraylist
Hi.sry I am so newbie and I try to make a list, where I can add and delete items by clicking on the button.
I know that I have to make arraylist or something, but how I have to start that code.
In this kind of list , I cant add and delete them, right?
public class NewList extends Activity {
private ListView lView;
private String lv_items[] = { "kala", "juust", "vorst" };
@Override public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.main);
lView = (ListView) findViewById(R.id.ListView01);
// Set option as Multiple Choice. So that user can able to select more the one option from list
lView.setAdapter(new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_multiple_choice, lv_items));
lView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE) ;
}
}
|
|
|