Two SearchView components with different searchable configuration

165 views Asked by At

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.

0

There are 0 answers