I am using a PlacePicker library from Google Play Services which starts up a new activity. The new activity/picker has a toolbar (actionbar) which is not styled by default.<
As is mentioned in the documentation that you provided in your question:
If you set custom colors in your application using the material theme, the place picker inherits the colorPrimary and colorPrimaryDark attributes from the theme.
However, you have not specified the actual Material theme (Theme.Material.Light
) in your style.xml
file; rather, you have utilized Theme.AppCompat.Light
which, while it is designed to look and operate the same as the Material theme, is a support library designed to provide backward compatability for the Material theme all the way to Android 2.1 (API 7). My guess would be that the PlacePicker
library only inherits the colorPrimary
and colorPrimaryDark
attributes from the true Material theme and not the support library.
An easy way to test this would be to modify your style.xml
file to use the real Material theme and see if this works:
The only drawback of course is that the Material theme is only available in API ≥ 21, so, if this works, then you would be restricted to devices that utilize Lollipop only.
Lastly, as a sidenote, the Theme.AppCompat
support libraries do not use the android:
namespace, so your original style.xml
file can be shortened as follows: