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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:14:29+00:00 2026-05-22T12:14:29+00:00

I have a ListView which is layout below a header bar and layout above

  • 0

I have a ListView which is layout below a header bar and layout above a footer bar. Each row of the ListView contains a LinearLayout with a CheckBox and TextView side by side. Now, when I have more rows that can be shown at a time, you can of course scroll down or up. However, once I scroll down or up the first and / or last CheckBox is being checked automatically. My finger is nowhere near where you would select the check box. What could be causing this?
Note I used code here: http://www.anddev.org/checkbox_text_list___extension_of_iconified_text_tutorial-t771.html

  • 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-22T12:14:29+00:00Added an answer on May 22, 2026 at 12:14 pm

    Looking briefly into code presented under link in question I can see the following:

     public View getView(int position, View convertView, ViewGroup parent){
          CheckBoxifiedTextView btv;
          if (convertView == null) {
               btv = new CheckBoxifiedTextView(mContext, mItems.get(position));
          } else { // Reuse/Overwrite the View passed
               // We are assuming(!) that it is castable!
               CheckBoxifiedText src = mItems.get(position);
               btv = (CheckBoxifiedTextView) convertView;
               btv.setCheckBoxState(src.getChecked());  // set checked state
               btv = (CheckBoxifiedTextView) convertView;
               btv.setText(mItems.get(position).getText());
          }
          return btv;
     }
    

    As you can see the view is reused during scroll and checkbox state is set with method setCheckBoxState.
    Then in CheckBoxifiedTextView you can find:

     public void setCheckBoxState(boolean bool)
     {
         mCheckBox.setChecked(mCheckBoxText.getChecked());
         mCheckBoxText.setChecked(true); // <-- HERE !
     } 
    

    where in 4th line there is setChecked(true) hardcoded which might be causing the issue.

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

Sidebar

Related Questions

Hallo all, I have a ListView which contains a Button in each line. The
I want to create a layout which contains TextView , Button and ListView here
I have a ListView, in which i have added a header. the header contains,
I have a listview of store building locations. Each row contains address, phone, hours,
I have a listview with lists lines of an invoice (Which are editable), each
I have a listview that contains values from webservice.Each page contains only 10 listitems
I have a problem with my listview which contains an ImageView and a few
I have a listview NoteList which contains a method doListRefresh() to select list contents
I have a ListView, and I want to customize the layout of each item
I have a ListView with a pretty standard view for each row - an

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.