You need to use ListView.setChoiceMode (int mode) . how
listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
or
listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
to enable checkboxes.
So your code will look like
ArrayAdapter<String> arrayAdapter =
new ArrayAdapter<String>(this,android.R.layout.simple_list_item_single_choice, array_list_title);
listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
listView.setAdapter(arrayAdapter);
source
share