forked from organicmaps/organicmaps
[android] Open search activity in P2P mode.
This commit is contained in:
parent
4c2b078053
commit
dee0e3e7d7
2 changed files with 18 additions and 0 deletions
|
@ -833,6 +833,18 @@ public class RoutingController
|
|||
build();
|
||||
}
|
||||
|
||||
void searchPoi()
|
||||
{
|
||||
if (mStartPoint == null)
|
||||
{
|
||||
searchPoi(1);
|
||||
return;
|
||||
}
|
||||
|
||||
if (mEndPoint == null)
|
||||
searchPoi(2);
|
||||
}
|
||||
|
||||
void searchPoi(int slotId)
|
||||
{
|
||||
mLogger.d(TAG, "searchPoi: " + slotId);
|
||||
|
|
|
@ -218,6 +218,12 @@ class SearchWheel implements View.OnClickListener
|
|||
switch (v.getId())
|
||||
{
|
||||
case R.id.btn_search:
|
||||
if (RoutingController.get().isPlanning())
|
||||
{
|
||||
RoutingController.get().searchPoi();
|
||||
return;
|
||||
}
|
||||
|
||||
if (mCurrentOption != null || !TextUtils.isEmpty(SearchEngine.getQuery()))
|
||||
{
|
||||
SearchEngine.cancelSearch();
|
||||
|
|
Loading…
Add table
Reference in a new issue