开发者

listview view nothing when use android.R.layout.simple_list_item_multiple_choice

开发者 https://www.devze.com 2023-03-11 20:53 出处:网络
I need your help with listview in android. I use the code below: Cursor c = getContentResolver().query(

I need your help with listview in android. I use the code below:

Cursor c = getContentResolver().query(
     People.CONTENT_URI, null, null, null, null);
     startManagingCursor(c);

     String[] columns = new String[] {People.NAME};
     int[] names = new int开发者_如何学编程[] {R.id.row_entry};

     mAdapter = new SimpleCursorAdapter(this, android.R.layout.simple_list_item_multiple_choice, c, columns, names);

     lView.setAdapter(mAdapter);

bec i want to have checkbox with it. and after that how can i get all value that check as well.

Thank you, Raksa,


Try changing your R.id.row_entry to android.R.id.text1

0

精彩评论

暂无评论...
验证码 换一张
取 消