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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:37:45+00:00 2026-05-27T14:37:45+00:00

I know that android doesn’t highlight anything in TouchMode. But I am doing something

  • 0

I know that android doesn’t highlight anything in TouchMode. But I am doing something similar to the gmail application in which you select stuff from the left side and show details on the right side of the activity(wonder how Google did that).

So the story is I have to highlight what’s been selected on the left side ListView. I’ve found some similar questions and the solutions are basically:

1.override the adapter’s getView method and setBackground for selected position

2.setBackground of the view onItemClick and clear it for anther selection

But none of them worked for me due to a weird behaviour: As I click on one item and highlight it, the fifth item after it is highlighted as well, and so on so forth as I scroll down the list.

Any suggestions? THX!

  • 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-27T14:37:46+00:00Added an answer on May 27, 2026 at 2:37 pm

    Use listView.setChoiceMode(int choiceMode);

    Parameters

    choiceMode One of CHOICE_MODE_NONE, CHOICE_MODE_SINGLE, or CHOICE_MODE_MULTIPLE from class android.widget.AbsListView

    http://developer.android.com/reference/android/widget/AbsListView.html#setChoiceMode(int)

    You also need to add MultiChoiceModeListener, you can have CHOICE_MODE_SINGLE

    (android.widget.AbsListView.MultiChoiceModeListener)

    Refer to the sample below

    http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/List16.html

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

Sidebar

Related Questions

I know that Android has a JSON parser baked in but I was wondering
I want to know that how voice recognition in android works? Which library it
I know that |DataDirectory| will resolve to App_Data in an ASP.NET application but is
I know Android doesn't support MJPEG natively but are there any jar files/drivers available
Does anyone know of any existing projects that aim to port Android's Java VM
Now that Google Earth has been released for Android 2.1, does anyone know what,
I know that eclipse can do this, can Intellij via the new Android support
From Android widget screen guidelines, http://developer.android.com/guide/practices/ui_guidelines/widget_design.html , we know that, home screen has 4*4
I know that I can do something like $int = (int)99; //(int) has a
Android doesn't appear to provide a way for a user application to change the

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.