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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:17:58+00:00 2026-05-27T12:17:58+00:00

I have a custom xml file for my listview and then I use an

  • 0

I have a custom xml file for my listview and then I use an ArrayAdapter and overwrite the getView() function to set the values for the textviews in my listview.

<?xml version="1.0" encoding="utf-8"?>
<TableLayout android:id="@+id/tableLayout1" xmlns:android="http://schemas.android.com/apk/res/android">    
    <TableRow android:id="@+id/tableRow1">
        <TextView android:id="@+id/Name"></TextView>
    </TableRow>
    <TableRow android:id="@+id/tableRow2">
        <TextView android:id="@+id/Hrs"></TextView>
    </TableRow>
    <TableRow android:id="@+id/tableRow3">
        <TextView android:id="@+id/Value"></TextView>
    </TableRow>
</TableLayout>

Everything works fine right now, I can select an item in the listview to go inside it and I can long tap an item to get the context menu too.

The problem is if I try to add a checkbox to the above table (I also tried to change the table to a linear layout) then I can no longer select an item from the listview and I can no longer double tap on an item, although I can click on the checkbox. I want to be able to click on the checkbox which should fire an event and also have the ability to select an item in listview and long tap on an item too.

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-27T12:17:58+00:00Added an answer on May 27, 2026 at 12:17 pm

    It is very simple…..

    IN your XML file where you have the <CheckBox> </CheckBox> put android:focusable="false"

    So the end should look like this >>>

    <CheckBox>...android:focusable="false"...</CheckBox>  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one custom ListView called AreasListView which I've included in the XML file.
I have custom checkstyle checks file (called checks.xml), and I'm trying to use that
I have created a custom xml file which I use as a config for
I have a custom spinner dropdown xml file in /res/layout/: spinner_view_dropdown.xml: <?xml version=1.0 encoding=UTF-8?>
I have created a custom listview that is populated using a row.xml file. Each
I have created custom listview, each row looks like my file custom_row.xml. Is there
I have a custom XML file format which can contain blocks of code within
I have custom component that I can place in my layout file (XML) for
I am currently watching an XML file from log4j output. I have a custom
friends, i have created custom title bar using following titlebar.xml file with code <?xml

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.