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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:27:42+00:00 2026-06-06T14:27:42+00:00

i am developing an app in which i get data from server and display

  • 0

i am developing an app in which i get data from server and display in map. but before display it on map’s balloon i have just sort data by one field name is “Destination” and there are method made na,e is ..GOTOSORT….

now problem is i got variables s with length 1 and there for the for loop are run only 1 time , but there are 42 data are come from webservices so please check it and tell me what is the problem

private void GOTOSORT() {

        Log.i(TAG, " SORT ");
        Map<Float, Integer> map = new TreeMap<Float, Integer>();

        for (int i = 0; i < lng_timeStamp.length; ++i) {
            map.put((float) lng_timeStamp[i], i);
        }
        Collection<Integer> indices = map.values();
        System.out.println("indices" + indices);
        Integer s[] = (Integer[]) indices.toArray(new Integer[0]);

        Log.i(TAG, "s.length"+s.length);
        for (int i = 0, n = s.length; i < n; i++) {
            System.out.println(s[i]);

            int_sort_MyhourGetTime[i] = int_MyhourGetTime[s[i]];
            int_sort_MyMinGetTime[i] = int_MyMinGetTime[s[i]];
            lng_sor_timeStamp[i] = lng_timeStamp[s[i]];
            arr_sort_ServiceNumber[i] = arr_ServiceNumber[s[i]];
            arr_sort_Destination[i] = arr_Destination[s[i]];

        }
  • 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-06T14:27:43+00:00Added an answer on June 6, 2026 at 2:27 pm

    If you want to sort your list , you should follow the Java’s comparatorFollow here
    It will return you a sorted list in any order.

    All the best !! 🙂

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

Sidebar

Related Questions

i am developing app that would receive data from server any time. i have
I am developing an app in which i can get Image from URL and
I am developing a Swing/Java app but having difficulties passing data from the initiliaser
I am developing an Android App that gets some data from a web server,
I'm developing an iPhone app which displays some tiles from a map. I've got
I'm developing an app which requires the system to get the touch events even
I am developing an app which uses barcode to get the product information of
I'm considering developing an app for Google App Engine, which should not get too
I'm developing an app which has a large amount of related form data to
I learning Python (coming from a dotnet background) and developing an app which interacts

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.