我正在使用 PlaceAutocompleteFragment 来搜索地点。
下面是我的xml代码
<fragment
android:id="@+id/place_source"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@color/colorPrimary"
android:name="com.google.android.gms.location.places.ui.PlaceAutocompleteFragment" />
我想删除默认情况下随片段附带的搜索图标。
您可以使用这一行来获取搜索图标的引用:((View)findViewById(R.id.place_autocomplete_search_button)).setVisibility(View.GONE);
和这一行来获取 EditText 的引用:((EditText)findViewById(R.id.place_autocomplete_search_input))
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)