如何更改PlaceAutocomplete.IntentBuilder Android的文本和后退箭头颜色

时间:2016-06-09 09:08:55

标签: android google-places-api

我正在尝试将PlaceAutoComplete Intent的操作栏的textColor和箭头颜色更改为白色而不是黑色。

style.xml

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorPrimary</item>
    <item name="android:windowContentOverlay">@null</item>
    <item name="colorControlNormal">@color/white</item>
</style>

和意图调用是使用FullScreen,代码是:

     try {
    Intent intent = new PlaceAutocomplete.IntentBuilder(PlaceAutocomplete.MODE_FULLSCREEN)                                                                    .build(BaseActivity.this);
  startActivityForResult(intent, PLACE_AUTOCOMPLETE_REQUEST_CODE);
  dialog.dismiss();
} catch (GooglePlayServicesRepairableException e) {
 // TODO: Handle the error.
} catch (GooglePlayServicesNotAvailableException e) {
 // TODO: Handle the error.
}catch (Exception e){
e.printStackTrace();
}

enter image description here

0 个答案:

没有答案