mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Fix Codacy issues
This commit is contained in:
parent
fc2557d47f
commit
2dafd88a6c
6 changed files with 31 additions and 18 deletions
|
|
@ -10,24 +10,24 @@ import android.view.MenuItem;
|
|||
import android.view.View;
|
||||
import android.widget.ProgressBar;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import fr.free.nrw.commons.R;
|
||||
import fr.free.nrw.commons.location.LatLng;
|
||||
import fr.free.nrw.commons.location.LocationServiceManager;
|
||||
import fr.free.nrw.commons.R;
|
||||
import fr.free.nrw.commons.theme.BaseActivity;
|
||||
import fr.free.nrw.commons.utils.UriSerializer;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class NearbyActivity extends BaseActivity {
|
||||
@BindView(R.id.progressBar)
|
||||
ProgressBar progressBar;
|
||||
private boolean isMapViewActive = false;
|
||||
//public List<Place> placeList;
|
||||
|
||||
private LocationServiceManager locationManager;
|
||||
private LatLng curLatLang;
|
||||
|
|
@ -153,6 +153,9 @@ public class NearbyActivity extends BaseActivity {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls fragment for map view
|
||||
*/
|
||||
public void setMapFragment() {
|
||||
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
||||
NearbyMapFragment fragment = new NearbyMapFragment();
|
||||
|
|
@ -161,6 +164,9 @@ public class NearbyActivity extends BaseActivity {
|
|||
ft.commit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls fragment for list view
|
||||
*/
|
||||
public void setListFragment() {
|
||||
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
||||
NearbyListFragment fragment = new NearbyListFragment();
|
||||
|
|
|
|||
|
|
@ -26,6 +26,12 @@ import timber.log.Timber;
|
|||
public class NearbyController {
|
||||
private static final int MAX_RESULTS = 1000;
|
||||
|
||||
/**
|
||||
* Prepares Place list to make their distance information update later.
|
||||
* @param curLatLng current location for user
|
||||
* @param context context
|
||||
* @return Place list without distance information
|
||||
*/
|
||||
public static List<Place> loadAttractionsFromLocation(LatLng curLatLng, Context context) {
|
||||
Timber.d("Loading attractions near %s", curLatLng);
|
||||
if (curLatLng == null) {
|
||||
|
|
@ -62,7 +68,6 @@ public class NearbyController {
|
|||
* @param placeList list of nearby places in Place data type
|
||||
* @return Place list that holds nearby places
|
||||
*/
|
||||
|
||||
public static List<Place> loadAttractionsFromLocationToPlaces(
|
||||
LatLng curLatLng,
|
||||
List<Place> placeList) {
|
||||
|
|
|
|||
|
|
@ -9,19 +9,22 @@ import android.view.View;
|
|||
import android.view.ViewGroup;
|
||||
import android.widget.ListView;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnItemClick;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnItemClick;
|
||||
import fr.free.nrw.commons.R;
|
||||
import fr.free.nrw.commons.location.LatLng;
|
||||
import fr.free.nrw.commons.utils.UriDeserializer;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
import timber.log.Timber;
|
||||
|
||||
public class NearbyListFragment extends ListFragment {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package fr.free.nrw.commons.utils;
|
||||
|
||||
|
||||
import android.net.Uri;
|
||||
|
||||
import com.google.gson.JsonDeserializationContext;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue