Fix POI edit activity
This commit is contained in:
parent
d195ebc054
commit
fdfc13681d
3 changed files with 7 additions and 10 deletions
|
@ -267,7 +267,6 @@ public class NavigatePointFragment extends SherlockFragment implements SearchAct
|
|||
try {
|
||||
double lat = convert(((TextView) view.findViewById(R.id.LatitudeEdit)).getText().toString());
|
||||
double lon = convert(((TextView) view.findViewById(R.id.LongitudeEdit)).getText().toString());
|
||||
TargetPointsHelper targetPointsHelper = ((OsmandApplication) getActivity().getApplication()).getTargetPointsHelper();
|
||||
if(mode == ADD_TO_FAVORITE) {
|
||||
Bundle b = new Bundle();
|
||||
Dialog dlg = MapActivityActions.createAddFavouriteDialog(getActivity(), b);
|
||||
|
|
|
@ -236,15 +236,6 @@ public class SearchActivity extends SherlockFragmentActivity implements OsmAndLo
|
|||
} else {
|
||||
updateSearchPoint(latLon, getString(R.string.search_position_fixed), true);
|
||||
}
|
||||
} else if (requestCode == SearchPoiFilterActivity.REQUEST_POI_EDIT) {
|
||||
for(WeakReference<Fragment> ref : fragList) {
|
||||
Fragment f = ref.get();
|
||||
if(f instanceof SearchPoiFilterActivity) {
|
||||
if(!f.isDetached()) {
|
||||
((SearchPoiFilterActivity) f).refreshPoiListAdapter();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -103,6 +103,13 @@ public class SearchPoiFilterActivity extends SherlockListFragment implements Se
|
|||
startActivityForResult(newIntent, REQUEST_POI_EDIT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
if(requestCode == REQUEST_POI_EDIT) {
|
||||
refreshPoiListAdapter();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onListItemClick(ListView parent, View v, int position, long id) {
|
||||
final PoiFilter filter = ((AmenityAdapter) getListAdapter()).getItem(position);
|
||||
|
|
Loading…
Reference in a new issue