From ea8759acdfbd18b5266d4a085b790eeed1225f5b Mon Sep 17 00:00:00 2001 From: misaochan Date: Tue, 6 Sep 2016 19:13:11 +1200 Subject: [PATCH] Add comments --- .../java/fr/free/nrw/commons/nearby/NearbyListFragment.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 5aec082b7..86ea40b78 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 @@ -62,6 +62,7 @@ public class NearbyListFragment extends ListFragment implements TaskListener { @Override public void onViewCreated(View view, Bundle savedInstanceState) { + //Check that this is the first time view is created, to avoid double list when screen orientation changed if(savedInstanceState == null) { mLatestLocation = ((NearbyActivity) getActivity()).getmLatestLocation(); listview = (ListView) getView().findViewById(R.id.listview); @@ -73,9 +74,8 @@ public class NearbyListFragment extends ListFragment implements TaskListener { progressBar.setVisibility(View.GONE); } - // If we are returning here from a screen orientation - // and the AsyncTask is still working, re-create and display the - // progress dialog. + // If we are returning here from a screen orientation and the AsyncTask is still working, + // re-create and display the progress dialog. if (isTaskRunning) { progressBar.setVisibility(View.VISIBLE); }