I've been able to add all of my markers to my map, using locations provided by my API, but I've been unable to add an ActionBar.
As mentioned, I am using the Android Studio "Google Maps Activity" template. How can I go about adding an ActionBar to this template?
Please let me know if there's any code that you need from me.
Extending AppCompatActivity
instead of FragmentActivity
helped me.
Since your minSdk is 18, you shouldn't be using the support theme (AppCompat
). Change it to holo:
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
</style>
Also make sure your activities extend Activity
or FragmentActivity
.
I followed this example https://developer.android.com/training/appbar/setting-up.html and I changed my coordinator layout to relative layout so that I could position my map fragment and other buttons below the toolbar.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With