How to remove search icon from PlaceAutocompleteFragment in Android

前端 未结 5 536
一整个雨季
一整个雨季 2021-01-14 03:45

I am using PlaceAutocompleteFragment to search places. Below is my xml code



        
5条回答
  •  迷失自我
    2021-01-14 04:31

    This question is a bit old, but I'll leave this here for future viewers.

    While @rajat44's answer solves it when you have one PlaceAutocompleteFragment, if you have multiple you can do this:

    pacf.getView().findViewById(R.id.place_autocomplete_search_button).setVisibility(View.GONE);
    pacf2.getView().findViewById(R.id.place_autocomplete_search_button).setVisibility(View.GONE);
    

提交回复
热议问题