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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:44:35+00:00 2026-06-17T07:44:35+00:00

I am in the process of developing a lengthy list view that is created

  • 0

I am in the process of developing a lengthy list view that is created from a JSON array coming from my server. When an item is selected it could be anywhere in the list and when I return I want to jump back to that specific item.

I was thinking about the setSelection(position) structure but I was curious as to how the position variable is set. Does it need to come from the JSON string or is it a variable that is created while the list view is being filled. If it is created what is the syntax of retrieving it so I can pass it to the Activity in charge of displaying more data and then back to the original Activity when the list view is redisplayed.

As additional information I just added the functionality of storing it in my preferences so it will load faster so it is stored on the phone. If the data has changed due to user interaction I retrieve the new JSON string so maintaining position is not critical.

I was hoping to not need to rebuild my JSON string to contain this variable.

Thanks

  • 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-17T07:44:36+00:00Added an answer on June 17, 2026 at 7:44 am

    use setOnItemClickListener on ListView and save the current position on a local variable (persist or non persist depends on need ) , use this setSelection method on ListView object while you come back (onResume if its a Activity) , check for nulls before setting.

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

Sidebar

Related Questions

I'm in the process of developing an iOS app that retrieves images from a
I'm in the process of developing a Silverlight custom control that hosts a Flash
I'm in the process of developing a website that makes use of JQuery's superfish.
I'm currently in the process of developing a GWT 1.7.1 application that deals with
I'm in the process of developing a .NET application that needs to be able
I'm developing a little web app that is used to simply process and store
We are in the process of developing a client-server software (in C#, Net 2.0)which
I am in the process of developing several data entry forms that the client
We're in the process of developing a simple webapp that will be made available
I am in the process of developing my first client and corresponding server applications.

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.