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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:55:02+00:00 2026-06-09T22:55:02+00:00

I’ve spent the past 3 hours trying to make this work, so sorry if

  • 0

I’ve spent the past 3 hours trying to make this work, so sorry if I forget to post something…

Here’s the problem:

  • I’m using a ListView, which has a custom BuddyArrayAdapter which inflates an XML containing a side-by-side image and a CheckedTextView. I want to have only one choice, so i set it up to use SINGLE_CHOICE.

(Pretend the ampersands are images and brackets are checkedtextview’s checkbox.)

    //my list looks like this

    & name1Here          []

    & name2Here          []

    & name3Here          []

    & name4Here          []

I’ll post code tomorrow, but here’s what I’ve been experiencing.
– if i use getChildAt() in the listView’s onItemClick(), random children check on and off, but after enough clicks all of them uncheck eventually.
– if i implement checkedTextView.onClick() in the adapter’s getView(), i get nullpointerexceptions for every row in the listview.
– if I do anything else that makes sense, upon selecting a row, the checkbox ticks and immediately unticks itself as if i didn’t click. But it’s still “clicked” because i can get it with listView.getCheckedItemPosition()

I have looked through the code, and i’m not calling toggle() anywhere anymore. The only clickListener i have is in the list.

Basically, this is what it looks like now

        public void onItemClick(AdapterView<?> parent, View view, int position, long id)
        {
            listConversations.setItemChecked(position, true);
            Log.d("<>>>>>>>>>>>>>>>>>>>>>>>>>>>", "listConversations.getCheckedItemPosition() = "+listConversations.getCheckedItemPosition());

            listConversations.


            OnContactClick(position, id);
        }

The number logged is correct. However even with this dumb approach the CheckedTextView’s checkable part still ticks/unticks itself on one click. This was my last try for today since i expected the listview to tick off all the others, but no. Either i have way more than one, or none at all.

If you still don’t understand the question – what did I mess up to earn this hell and not be able to make the checkmark work like it’s supposed to?!?!

Please help. I wasted 3 hours on this ridiculously retarded thing. I am desperate.

lastminuteadd: looks like i’m having the same kind of issue as this guy
ListView: setItemChecked only works with standard ArrayAdapter – does NOT work when using customized ArrayAdapter?

  • 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-09T22:55:03+00:00Added an answer on June 9, 2026 at 10:55 pm

    Because nobody answered I guess I’ll have to…

    The trick was to make a Wrapper class implement Checkable. And to make the wrapper class if one was missing…

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to create an if statement in PHP that prevents a single post
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't

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.