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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:18:07+00:00 2026-05-16T22:18:07+00:00

I have a ListActivity working as expected. When a list item is clicked the

  • 0

I have a ListActivity working as expected. When a list item is clicked the app responds properly. I want to add a checkbox on the far right side of the screen, next to each list item. When I attempted to do that by updating the XML (see below) I lost the onListItemClick functionality. When I clicked on a list item nothing happened.


<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <TableLayout
        android:id="@+id/table1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:stretchColumns="1">

        <TableRow>
            <TextView android:id="@+id/tvProduct" 
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textSize="20sp"
                android:paddingLeft="10sp"
                android:paddingRight="10sp" />
        </TableRow>

    </TableLayout>

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">

        <TextView android:id="@+id/tvPrice" 
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:paddingLeft="10sp"
            android:paddingRight="10sp"
            android:textColor="#606060" />

    </LinearLayout>

</LinearLayout>

I am trying to add the checkbox next to the tvProduct object.

Any help is appreciated.

  • 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-16T22:18:08+00:00Added an answer on May 16, 2026 at 10:18 pm

    When a ListView has focusable (clickable) children, it loses focusablitity itself. You can either have a checkbox (button, etc) by clickable inside of a ListView, or have the entire row be clickable.

    If you are trying to allow the user to select multiple rows and show the selection state in a checkbox, you can use the choiceMode CHOICE_MODE_MULTIPLE.

    Here is an example of it in use.

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

Sidebar

Related Questions

I'm creating a ListActivity. In each list item I have a View I've created
I have a ListActivity and I want to implement context menu for each of
I am working with a ListActivity, and I'm trying to add images/backgrounds, ext to
I have a ListActivity containing an object I've defined called a MessageItem. I want
I have a ListActivity . Each item in the ListView contains a RatingBar .
I have a ListActivity where the list items are defined in another XML layout.
I'm working on an application that lists a stored library using a ListActivity. My
I have a ListActivity that should display quite a lot of items and where
I have a ListActivity whose layout looks like <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent
Im opening a ListActivity with an xml called list with a ListView named list.

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.