Fixed search keyboard and sort cities
This commit is contained in:
parent
b4858c811e
commit
e11e87384c
2 changed files with 10 additions and 1 deletions
|
@ -536,7 +536,7 @@ public class SearchUICore {
|
|||
if (o1.getFoundWordCount() != o2.getFoundWordCount()) {
|
||||
return -Algorithms.compare(o1.getFoundWordCount(), o2.getFoundWordCount());
|
||||
}
|
||||
if (!sortByName || sp.isEmpty()) {
|
||||
if (!sortByName) {
|
||||
double s1 = o1.getSearchDistance(loc);
|
||||
double s2 = o2.getSearchDistance(loc);
|
||||
int cmp = Double.compare(s1, s2);
|
||||
|
|
|
@ -1313,6 +1313,10 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
|
|||
searchUICore.updateSettings(settings.setRadiusLevel(1));
|
||||
}
|
||||
runCoreSearch(txt, false, false);
|
||||
if (sr.objectType == ObjectType.CITY) {
|
||||
searchEditText.requestFocus();
|
||||
AndroidUtils.softKeyboardDelayed(searchEditText);
|
||||
}
|
||||
}
|
||||
|
||||
public void replaceQueryWithUiFilter(PoiUIFilter filter, String nameFilter) {
|
||||
|
@ -1484,6 +1488,8 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
|
|||
historySearchFragment.updateLocation(latLon, heading);
|
||||
} else if (categoriesSearchFragment != null && viewPager.getCurrentItem() == 1) {
|
||||
categoriesSearchFragment.updateLocation(latLon, heading);
|
||||
} else if (addrSearchFragment != null && viewPager.getCurrentItem() == 2) {
|
||||
addrSearchFragment.updateLocation(latLon, heading);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1499,6 +1505,9 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
|
|||
if (categoriesSearchFragment != null) {
|
||||
categoriesSearchFragment.getListAdapter().setUseMapCenter(useMapCenter);
|
||||
}
|
||||
if (addrSearchFragment != null) {
|
||||
addrSearchFragment.getListAdapter().setUseMapCenter(useMapCenter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue