fix also searchAddressOnline fragment to be origin aware
This commit is contained in:
parent
b2b8851a7b
commit
9bcb3c5611
1 changed files with 8 additions and 1 deletions
|
@ -132,13 +132,14 @@ public class SearchAddressOnlineFragment extends SherlockFragment implements Sea
|
||||||
if (location == null) {
|
if (location == null) {
|
||||||
location = settings.getLastKnownMapLocation();
|
location = settings.getLastKnownMapLocation();
|
||||||
}
|
}
|
||||||
|
locationUpdate(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void locationUpdate(LatLon l) {
|
public void locationUpdate(LatLon l) {
|
||||||
location = l;
|
location = l;
|
||||||
if(adapter != null){
|
if(adapter != null){
|
||||||
adapter.notifyDataSetInvalidated();
|
adapter.updateLocation(l);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,6 +245,12 @@ public class SearchAddressOnlineFragment extends SherlockFragment implements Sea
|
||||||
}
|
}
|
||||||
|
|
||||||
class PlacesAdapter extends ArrayAdapter<Place> {
|
class PlacesAdapter extends ArrayAdapter<Place> {
|
||||||
|
private LatLon location;
|
||||||
|
|
||||||
|
public void updateLocation(LatLon l) {
|
||||||
|
location = l;
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
public PlacesAdapter(List<Place> places) {
|
public PlacesAdapter(List<Place> places) {
|
||||||
super(getActivity(), R.layout.search_address_online_list_item, places);
|
super(getActivity(), R.layout.search_address_online_list_item, places);
|
||||||
|
|
Loading…
Reference in a new issue