0

Hi I have problem with planning implementation of specific search interface.

I am making navigation application where you can navigate from point to point. For this I need two seachviews both with different searchable configuration, where I can define different custom intent action to recognize if user enter source or destination and react properly. I have already created suggestion logic because I am using one SearchView in other activity and already have different configuration there.

So my plan is creating an activity for result which will be in same time SearchActivity where I will setup two different SearchViews components where based on user input there will appear suggestions and after clicking them (first later second) the intent will be picked by CUSTOM1/2 ation intent in onNewIntent() as it will be "singleTop" activity and stored properly. Then i will process stored source&destination data and finish with proper response code to the source activity with extras based on processed data.

I don't know if I explained it properly. The main problem for me here is that I need to have two different SeachViews widgets. How to achieve this?

Eventually I can manage both SearchView suggestion results with default ACTION_VIEW and recognize them by sent data but I think the first plan is more clear.

PS I am planning to put them directly to the layout without appbar.

ssukienn
  • 558
  • 6
  • 22
  • In fact I am using some framework which is hard to refactor and is using both adapter and querytextlistener for his own tasks. Thats why I want to do it that way. – ssukienn Nov 07 '17 at 20:25
  • framework version of old SimpleCursorAdapter from support-core-ui library. There is ton of processing and using wrong puzzles in wrong places here and changing components here isn't really easier way. If I want to use new api I should rewrite whole framework which isn't possible now. So I am sticked to SearchView and try to accomplish it that way. – ssukienn Nov 07 '17 at 20:40
  • U enter text or part of it, based on map zoom it is reprocessed and created request for Google Place or sent to own serwer and processed by custom engine then list of suggestions is populated, clicking on suggestion retrieves object connected to it and fire navigation task. On the way the suggestion_columns from SearchManager are used in cursor logic. – ssukienn Nov 07 '17 at 21:01

0 Answers0