How can I detect click of AutocompleteSupportFragment in Android

Viewed 21

I have implemented AutocompleteSupportFragment to search for places in Android. When we click on the autocompleteFragment in the layout, it opens the places search fragment as overlay.

I need to detect that click on its search box that opens the overlay. If I override the click listener on the view, then the original click flow doesn't work. Can anyone suggest how to detect the click without causing issues to the click flow? Thanks.

private lateinit var autocompleteFragment: AutocompleteSupportFragment
...
autocompleteFragment = childFragmentManager.findFragmentById(R.id.autocomplete_fragment)
                as AutocompleteSupportFragment
0 Answers
Related