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 7496621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T18:41:59+00:00 2026-05-29T18:41:59+00:00

I have a ListView that inflate for each row a xml that contain a

  • 0

I have a ListView that inflate for each row a xml that contain a CheckBox and more TextViews that are in a RelativeLayout.
The problem is that I can’t figure out how to pass onClick events from checkbox to back row.
I want to achieve this behavior: The user press the checkbox and the whole list row gets pressed. I saw this behavior if I inflate for each row android.R.layout.simple_list_item_multiple_choice but I can’t figure out how to do that without this android specific layout.

Can anybody give me an idea or direction?

Below is the code:

Listview :

<ListView
    android:id="@+id/include_sent_list_view"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@color/white"
    android:cacheColorHint="@color/white"
    android:layout_alignParentTop="true"/>

And the xml that is inflated for each row:

<RelativeLayout 
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent">

<CheckBox
        android:id="@+id/checked_radio_button"
        android:layout_width="50dp"
        android:layout_height="fill_parent"
        android:layout_alignParentLeft="true"
        android:focusable="false"
        />
<TextView
        android:id="@+id/account_number_text"
        android:layout_width="100dp"
        android:layout_height="fill_parent"
        style="@style/config_simple_small_text_view_style"
        android:paddingTop="15dp"
        android:layout_toRightOf="@id/checked_radio_button"

        />
<TextView
        android:id="@+id/account_name_text"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        style="@style/config_simple_small_text_view_style"
        android:paddingTop="15dp"
        android:layout_toRightOf="@id/account_number_text"/>

</RelativeLayout>
  • 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-29T18:42:01+00:00Added an answer on May 29, 2026 at 6:42 pm

    The Checkbox consumes focus for the List item. You need to set this in your layout file:

    <!-- Must make this non-focusable otherwise it consumes  -->  
    <!-- events intended for the list item (i.e. long press) -->
    <CheckBox
        android:id="@+id/item_entry_check"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_centerVertical="true"
        android:focusable="false"
        />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a listview with each row having a checkbox, imageview and text view
I have an application with three textviews and one checkbox in each row of
I have a listview that is binded to a ThreadSafeObservableCollection. The background of each
I have a ListView that is populated using an XML file. However, I want
I have a a listview with each row having a text field and edittext
I have a ListView that contains a list of TextViews, and in my onItemClick()
I have a ListView with a custom Adapter that creates rows containing TextViews that
How can a have a ListView that has different amount of rows? Instead of
I have created a custom listview that have one webview per element. My problem
I have a listview with each row containing some text and a delete button.

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.