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

  • SEARCH
  • Home
  • 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 8127509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:33:23+00:00 2026-06-06T07:33:23+00:00

Goal: I am trying to create a UI with 2 checkboxes per line, each

  • 0

Goal: I am trying to create a UI with 2 checkboxes per line, each line seperated into sections. I’ve included a screenshot of the UI below.

Current approach: I am using an ExpandableListView and handeling the data with an onChildClick.

Problem: When you click a checkbox, it does not trigger onChildClick or anything else. Clicking anywhere outside of the checkbox will trigger this event.

Research: There are lots of threads that suggest setting android:focusable=”false”, but that doesn’t change anything for me. I have focusable set to false for every element in my UI.

Reproduction: I have the exact same problem running the code from this article without modification, which includes android:focusable=”false”. I based a lot of my code on that example, and If I can get it working using that codebase, I’m sure I can get it working in mine.

Current UI

  • 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-06-06T07:33:24+00:00Added an answer on June 6, 2026 at 7:33 am

    I think it’s because the checkbox consumes the event and doesn’t forward it to the list item.

    If you want to get the click on the boxes you can add OnClickListener to the boxes in the getView() of the list adapter.

    I understand you right, the box is at least getting checked? If you don’t need custom behaviour you just can read if the box is checked or not when you “submit” the list (or whatever is your next step of checking boxes).

    After reading comments, here is your code example with some additions:

    @Override
    public View getView(final int pos, final View convView, ViewGroup parent) {
    
        //initialize convView, define other local variables, etc. 
    
        CheckBox cb = (CheckBox) convView.findViewById(R.id.mycheckbox);
        cb.setOnCheckedChangeListener(new OnCheckedChangeListener() { 
    
            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { 
                Log.d("ElistCBox2", "listitem position: " + pos); 
            } 
        });
    
        return convView;
    }
    

    Note that you have to use final modifier for the variables which you use in the anonymous class, otherwise you get a compiler error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to create a moving back ground. My goal is to have a
Background / Goal More or less, I'm trying to create a nested group of
Goal: I am trying to create a slightly dynamic page animated with basic canvas
I am a Clojure n00b trying to create some XML strings. My goal is
I am trying to create multiple items (each with a name value and a
Trying to create a Driver type class where, below, Base is the Driver that
Goal I am trying to create a port (Macports) for an open source tool
I'm trying to create a simple function to do a status test. Goal is
I am trying to create a query that will shift the results on each
I'm trying to create a simple table with iTextSharp, so with C#. The goal

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.