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

  • Home
  • SEARCH
  • 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 6707563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:39:16+00:00 2026-05-26T07:39:16+00:00

Since the locaion (network or gps) takes a while to receive, how would one

  • 0

Since the locaion (network or gps) takes a while to receive, how would one use location data in a list view. If the list view is populated on create, often the location is not yet found and would be null.

Is the best way to architect this type of view to render the list view and then subsequently populate the rows with the location data?

If so or if not, what is the best approach? How would you implement this with code examples?

  • 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-26T07:39:17+00:00Added an answer on May 26, 2026 at 7:39 am

    You can setup a ListView with its data list and notify it when the data has changed. Here’s an example.

    ArrayList<String> myData = new ArrayList<String>();
    ListView myListView = null;
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       ...
    
       myListView = (ListView)findViewById(R.id.mylistview);
       myListView.setAdapter(new ArrayAdapter<String>(this, R.id.textlayout, myData));
    }
    

    What I did was get my list view and setup the adapter with an empty array list. Now, anytime I want to update the list views data, I do the following.

    myData.add("My new location");
    myListView.getAdapter().notifyDataSetChanged();
    

    The list view will be updated. Another way to do this is to add the data straight to the adapter instead of the list passed in.

    myArrayAdapter.setNotifyOnChange(true);
    myArrayAdapter.add("My new location");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to do a location-based search on App Engine, but since the data
Since debate without meaningful terms is meaningless , I figured I would point at
Since the keyboard is the interface we use to the computer, I've always thought
Since Rails is not multithreaded (yet), it seems like a threaded web framework would
I have a mapview where I want to track the user's current location. GPS
If I use window.location = ; to redirect a user, will any browsers give
Since bz2 is splittable and saves space, I'm planning to store the table data
I need to robocopy files from one location to another in a SSIS package.
I have an android application using LocationManager get the cell network location and not
I'm panning to a nearby location but the panTo function often jumps there since

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.