android - 更改 Place Autocomplete Fragment 的前景色和背景色

标签 android android-layout google-maps-android-api-2 google-places-api google-places

我使用过 Google Place API 并集成了 Place Autocomplete Fragment。我可以更改它的前景色或背景色吗?在我的设备中似乎有点沉闷。

enter image description here

而且我还想知道我可以在屏幕底部设置“powered by Google”这句话吗?我看到一些应用程序将它放在底部。

最佳答案

您只需在 java 中使用此代码即可。

placeAutoComplete.getView().setBackgroundColor(Color.WHITE);

您可以随意更改 Place Autocomplete Fragment 的背景颜色,在示例中我使用白色作为背景。

关于android - 更改 Place Autocomplete Fragment 的前景色和背景色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35891667/

相关文章:

android - 单击两次或更改 fragment 时,Google map fragment 崩溃

java - 随着 map 的移动在谷歌地图上获取标记

java - file.getName() 什么都不返回

java - 如何共享全屏图像android?

android - ImageView 在 Camera Surface View 后面移动

java - 是否可以将 Google Maps V2 MapFragment 放入 ActionBar 选项卡中?

android - 如何在Android中以编程方式将应用程序限制为特定数量的用户使用

android - 带有复选框的 ListView 中的 IndexOutOfBoundsException

javascript - 使用 Titanium 创建 Excel 文件

android - 可绘制图像缩放