diff --git a/app/src/main/java/fr/free/nrw/commons/nearby/NearbyListFragment.java b/app/src/main/java/fr/free/nrw/commons/nearby/NearbyListFragment.java index 4a944fd9a..7e0283d54 100644 --- a/app/src/main/java/fr/free/nrw/commons/nearby/NearbyListFragment.java +++ b/app/src/main/java/fr/free/nrw/commons/nearby/NearbyListFragment.java @@ -47,6 +47,7 @@ public class NearbyListFragment extends ListFragment { //Load from data source (NearbyPlaces.java) places = loadAttractionsFromLocation(mLatestLocation); + /* // Create a progress bar to display while the list loads ProgressBar progressBar = new ProgressBar(getActivity()); progressBar.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, @@ -56,6 +57,7 @@ public class NearbyListFragment extends ListFragment { // Must add the progress bar to the root of the layout ViewGroup root = (ViewGroup) view.getRootView(); root.addView(progressBar); +*/ mAdapter = new NearbyAdapter(getActivity(), places); setListAdapter(mAdapter); diff --git a/app/src/main/java/fr/free/nrw/commons/nearby/NearbyPlaces.java b/app/src/main/java/fr/free/nrw/commons/nearby/NearbyPlaces.java index ff2ad093c..5655be2de 100644 --- a/app/src/main/java/fr/free/nrw/commons/nearby/NearbyPlaces.java +++ b/app/src/main/java/fr/free/nrw/commons/nearby/NearbyPlaces.java @@ -31,8 +31,13 @@ public class NearbyPlaces { boolean firstLine = true; String line; - while ((line = in.readLine()) != null) { + int counter = 0; + //while ((line = in.readLine()) != null) { + while (in.readLine() != null && counter < 11) { + + line = in.readLine(); + counter++; // Skip CSV header. if (firstLine) { firstLine = false;