From 9bcb3c56114fb1acced524f2f0294f8d8316d78b Mon Sep 17 00:00:00 2001 From: sonora Date: Tue, 30 Dec 2014 11:41:36 +0100 Subject: [PATCH] fix also searchAddressOnline fragment to be origin aware --- .../activities/search/SearchAddressOnlineFragment.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressOnlineFragment.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressOnlineFragment.java index 4cac70a352..e2d0abe87d 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressOnlineFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressOnlineFragment.java @@ -132,13 +132,14 @@ public class SearchAddressOnlineFragment extends SherlockFragment implements Sea if (location == null) { location = settings.getLastKnownMapLocation(); } + locationUpdate(location); } @Override public void locationUpdate(LatLon l) { location = l; if(adapter != null){ - adapter.notifyDataSetInvalidated(); + adapter.updateLocation(l); } } @@ -244,6 +245,12 @@ public class SearchAddressOnlineFragment extends SherlockFragment implements Sea } class PlacesAdapter extends ArrayAdapter { + private LatLon location; + + public void updateLocation(LatLon l) { + location = l; + notifyDataSetChanged(); + } public PlacesAdapter(List places) { super(getActivity(), R.layout.search_address_online_list_item, places);