How can I add checkbox ListView like in Google Keep?

824 views Asked by At

I'm looking for a ListView with checkboxes and arrangeable by drag & drop. Something like in google keep's listview:

Google Keep's ListView

I'm new to all the part of building applications, so if it requires adding something to Eclipse, I'd love it to be attached also a guide :)

2

There are 2 answers

0
Phillip Dunley On

You can try by having a textView where user will make an entry. Below the TextView, you can create a listView where each element in the listview will have a checkbox.

Once user enters something in the textView and presses submit, you can add this entry into an ArrayList which is the adapter for the listview. Then you refresh the listView and this new entry will appear at the bottom.

0
VipulKumar On

You can use Android's simple_list_item_multiple_choice like this

ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
                android.R.layout.simple_list_item_multiple_choice, values);

It is very limited in functionality. So if you want to add more customizations to your listView, create a custom listView. Here is a link to a useful complete tutorial on that

Creating lists in Android