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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:42:33+00:00 2026-06-05T20:42:33+00:00

I am working on an android project where I am using a ListView and

  • 0

I am working on an android project where I am using a ListView and allowing the user to long press on the item so that they can select multiple items within the list view. This bit is working properly, but the problem that I am having is finding out which item has been selected so that I can get the value out and perform a query on the database based on what the user has selected. Below is the code that I am using for the the checked state event but I can’t figure out from here how to get the value from the TextView.

    public void onItemCheckedStateChanged(ActionMode mode, int position, long id, boolean checked)
    {
        final int checkedCount = getListView().getCheckedItemCount();
        String data = 
        switch (checkedCount)
        {
            case 0:
                mode.setSubtitle(null);
                break;
            case 1:
                mode.setSubtitle("One item selected");
                break;
            default:
                mode.setSubtitle("" + checkedCount + " items selected");
                break;
        }
    }

Thanks for any help you can provide.

  • 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-05T20:42:35+00:00Added an answer on June 5, 2026 at 8:42 pm
     can't figure out from here how to get the value from the TextView.
    

    not sure why you are looking to take the value from TextView. As it is non-editable so you have positron of the item, just get the data from adapter at this position and you will get what yo set in the Text View at this position.

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

Sidebar

Related Questions

I am currently working on an Android project. I am using a ListView and
I am working on a android project that can read e-mails from any gmail
I have a semester long project that I have been working on in Android
I am working on an Android project using C++ for the main development and
I am currently working on android project where I am using a custom list
I am working on an android project and I am using a spinner which
I am working on a android project. I n that I have to deal
I'm working on a project with a group that is using Eclipse, but I'm
I'm working on a project that utilizes the USB Host capabilities in Android 3.2.
I am working on an Android project in Eclipse and debugging / testing using

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.