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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:04:27+00:00 2026-06-03T02:04:27+00:00

I need help on a specific task : I have a ListView in my

  • 0

I need help on a specific task :

I have a ListView in my main activity with a custom Adapter associated, and an OnItemLongClick listener that displays a Dialog with many operations configured (change quantity, cancel item…) and it works like a charm.

My goal is to have a physical copy of the clicked item in the Dialog, to display immediately the changes made.

Since my ListView item is complex and designed by the Adapter, i can’t just get the reference to the original object, i need a visual copy of the selected ListView item…

I thought about creating the same structure (ListView and Adapter) with only the selected item associated but it’s kind of heavy…

Is there a simpler solution that can help me in this situation ? I mean real copy of the original ListView Item with changes made in my Dialog done to the original object…

  • 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-03T02:04:28+00:00Added an answer on June 3, 2026 at 2:04 am

    Posting your relavent code may help us to guide you more clearly.

    However you can get your object in onItemLongClick((AdapterView, View, int position, long) using position params i.e

    YourObject objReference = yourActivityClassObjectList.get(position);
    

    now when showing dialog, pass this objReference to your dialog and when changes made, change the contents of this objReference and call

    adapter.notifyDataSetChanged();
    

    instead of passing the objReference to dialog, you can pass int position and while changes made, get the reference to that object, change contents and notify data set changed to Adapter.

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

Sidebar

Related Questions

I need help. I have to do a very specific SQL Statement and I
I need help with a specific LINQ query (I still suck at em'!) Background
need help/guide for sql select query, I have 2 table stock and stock_history, in
need help regarding USSD Gateway. I have to develop an app, which will directly
need help in error in database pivot. i have table tamed table_score like below:
I need help on regex or preg_match because I am not that experienced yet
I need help finishing this statement. It is frustrating that two of the PHP
I'm new to Perl and I really need help witch a specific issue. I
This is very specific. I need help with using a C# function in my
I need to know how many processes are running for a specific task (e.g.

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.