Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6575699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:25:11+00:00 2026-05-25T15:25:11+00:00

I have added a checkbox inside a list view, but i am able to

  • 0

I have added a checkbox inside a list view, but i am able to select and unselect only the checkboxes but i cannot select the list item. How to overcome this problem? Any help is appreciated and thanks in advance…

My Code Goes Here

List<String> lst = dh.selectAll();
    lv = (ListView)findViewById(R.id.listView1);
    ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,R.layout.list,R.id.textViewx,lst);
    lv.setAdapter(adapter);


    lv.setOnItemClickListener(this);

dh.selectall() -> Contains the listarray of items from database;
lv -> list view identified
I’ve used array adapter and identified a textview to enter items in listview
at last, I’ve given a clicklistener to the listview by implementing OnItemClickListener.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T15:25:12+00:00Added an answer on May 25, 2026 at 3:25 pm

    You should use multiple choice listview. Fits your needs perfectly. Here is a link to a good tutorial : http://mubasheralam.com/tutorials/android/how-create-multiple-choice-list

    Update 1

    listViewObj.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
    

    When you have a checkable item in your listview, the touch on item will not be delivered to item. Just to test, set your checkbox as non clickable. chkox.setClickable(false); and test. The clicks will be delivered to your item.

    Update 2

    You should use android.R.layout.simple_list_item_multiple_choice for list item.

    List<String> lst = dh.selectAll();
    lv = (ListView)findViewById(R.id.listView1);
    ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
                             android.R.layout.simple_list_item_multiple_choice, lst);
    
    lv.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
    lv.setListAdapter(adapter);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Listview control lstStudents and i have added checkboxes inside the List
I have a gridview with checkbox inside asp:TemplateField . I wish to select multiple
I have a list of checkboxes, that I'd like, when clicked to be added
I have a form which contains list of data, I added a checkbox in
I have added checkbox selection model to grid panel. It works fine in IE8
I have a gridview that I have added a checkbox column using a templatefield
I have added the required assemblies and registered the NVelocityViewFactory in global.asax.cs page but
I have added an EventHandler for the Click-event to a picturebox but on runtime
I have added a textbox, a dropdownlist, a checkbox, a button, and an update
I have added a JCheckBox in a cell of a JTable. But when the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.