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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:29:24+00:00 2026-05-27T01:29:24+00:00

So I have ListView with the Single Choice mode enable. I have a selector

  • 0

So I have ListView with the Single Choice mode enable. I have a selector for the background of the list item and it changes correctly to the activated state.

Using .setSelected() doesn’t.

Even if I get the view for that list item and set its state to activated it still doesn’t work.

So far this is the best solution I have come up with but the setActivated isn’t working basically I have duplicated the code of the onItemClickListener but added setActivate().

InformationListAdapter adapter = new InformationListAdapter(getActivity().getApplicationContext(), info.infoSections);
lv.setAdapter(adapter);  
View v=adapter.getView(0, null, null);
v.setActivated(true);

InformationSection item = (InformationSection)lv.getItemAtPosition(0);
InformationWebFragment webFrag = (InformationWebFragment) getFragmentManager().findFragmentById(R.id.InfoWebFragment);
webFrag.updateDisplay(item);
  • 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-27T01:29:25+00:00Added an answer on May 27, 2026 at 1:29 am

    If you have access to the View which I suppose the line: View v=adapter.getView(0, null, null); gives you – then you can do this:

    v.performClick();
    

    That will fire the onClick-event and run the onClickListener for the specific View.

    Edit

    As we discovered in our discussion below one should call:

    listView.performItemClick(View view, int position, long id);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ListView , which is in single-choice mode . All I want
I have a ListView control that is in FullRowSelect mode, MultiSelect off and using
I want to create a single choice listview in which when an item is
I have a scenario that we should have a single choice mode radio button
Is it possible to have a single listview with 2 or more columns, operable
I have a ListView on a page that displays a list of widgets. When
I have a ListView with an ItemContainerStyle defined as such: <ListView Width=auto SelectionMode=Single ItemContainerStyle={StaticResource
I have a PlaceHolder control inside of a ListView that I am using to
I have a single ListView with a DataPager that loads datasource 'A' within an
I have only single Default.aspx page and a single ListView Control. Why am I

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.