Is there a startSearch() function equivalent that can be used in fragments

69 views Asked by At

I am developing a map in a fragment using mapView. The fragment consists of a mapView and a searchBar(mancj.materialsearchbar). I tried using startSearch() in the OnSearchActionListener() but it isnt possible unlike in activities were it is. Any solutions?

1

There are 1 answers

0
Sijan Neupane On

YourActivity.this.getActivity().startSearch(); this may work!