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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:12:46+00:00 2026-06-05T00:12:46+00:00

I am not sure it Android has this, or if there is a method

  • 0

I am not sure it Android has this, or if there is a method to do so. I looked at the Doc, but haven’t seen anything specifically for this use. Is there a preferred method that could be useful? Any help much appreciated.

I need it for an Agenda List with TextView Members. But when a user clicks on one, I need a way to access that agendas info, so like storing an ID from the database to reference that events info, but I need it hidden from the user.

  • 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-05T00:12:47+00:00Added an answer on June 5, 2026 at 12:12 am

    Use setTag() and getTag(), you can pass it whatever type of Object you like.

    Here’s the reference.

    Added from comment

    I believe it is simplest to query the database a few times rather than have one Cursor holding everything.

    For example, if we have a table with columns like: events(_id, name, startTime, endTime, people, etc). You could call SELECT * FROM events but that seems excessive if you only want the details on an event or two. It makes more sense to query SELECT _id, name FROM events and store this in a ListView. Then you can have:

    listView.setOnItemClickListener(new OnItemClickListener() {
        public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
            detailCursor = database.rawQuery(`SELECT * FROM events WHERE _id = ?`, new String[] { id });
            // Display this event's details somehow
        }
    }
    

    A secondary cursor, like this, is simplest. You don’t allocate memory for used event details and there isn’t a significant performance loss from these repeated minor queries. In a case like this I wouldn’t store anything in a View’s tag, the general cursor (with every event’s id and name) and the detail cursor should give you everything you need.

    Hope that helps.

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

Sidebar

Related Questions

I'm not sure if this question has been asked before, but I can't seem
Im planing on staring to develop games for android but im not sure where
Not sure if this belongs here because its not technically a 'programming' question, but
not sure if this is possible keeping the code simple, but im trying to
Not sure if that is the best of titles but... In my android app
I've seen this with other platforms (especially iPhone/iPad) but have not been able to
I've seen this with other platforms (especially iPhone/iPad) but have not been able to
After two years of Android development I'm still not 100% sure about what resources
Not sure what parallel programing means... but I have two thoughts of that Process
not sure why whenever i call the default file manager via intent, there is

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.