如何从所有PlaceAutocompleteFragment中禁用搜索图标?

时间:2018-02-20 01:01:10

标签: android-studio google-places-api

我的布局中有2个字段。 PickUp / Drop

autocompleteFragment_pickup = (PlaceAutocompleteFragment)
            getFragmentManager().findFragmentById(R.id.place_autocomplete_fragment_pickup);

autocompleteFragment_pickup = (PlaceAutocompleteFragment)
                getFragmentManager().findFragmentById(R.id.place_autocomplete_fragment_drop);

使用下面的代码,我只能禁用一个图标,但我有2个图标。搜索 - PickUp的图标和Drop地址中的其他一个。

((View)findViewById(R.id.place_autocomplete_search_button)).setVisibility(View.GONE);

只有PickUp的图标才会被隐藏。

according to this question

0 个答案:

没有答案