Flat action bar with Theme.Material
Asked Answered
L

2

6

can someone help me with Material theming?

I want actionbar be flat. Here is code I try to use.

<style name="Theme.Kpi_Schedule.full" parent="android:Theme.Material.Light.DarkActionBar">
   <item name="android:windowContentOverlay">@null</item>
   <item name="android:colorPrimaryDark">#1E88E5</item>
   <item name="android:popupBackground">#fff</item>
   <item name="android:windowTranslucentNavigation">true</item>
   <item name="android:navigationBarColor">@android:color/transparent</item>
   <item name="android:actionBarStyle">@style/ActionBar.Solid.Kpi_Schedule.full</item>
</style>

<style name="ActionBar.Solid.Kpi_Schedule.full" parent="android:Widget.Material.ActionBar.Solid">
   <item name="android:windowActionBarOverlay">true</item>
   <item name="android:background">#03A9F4</item>
   <item name="android:displayOptions">homeAsUp</item>
</style>

Problem here

Lashondalashonde answered 12/11, 2014 at 15:8 Comment(0)
L
5

I found an answer:

I had to add

<item name="android:elevation">0dp</item>

to my theme file.

Lashondalashonde answered 12/11, 2014 at 17:53 Comment(0)
M
-1

Its not an action bar. Its a "Toolbar" Refer this link for more info http://android-developers.blogspot.in/2014/10/appcompat-v21-material-design-for-pre.html

If u want to stay with actionbar use this library. U can have that material design like animation and look : https://github.com/markushi/android-ui

Marijo answered 12/11, 2014 at 15:10 Comment(2)
Ammmm. No. Its not. I dont use AppCompatLashondalashonde
ohk, if u want to stay with actionbar, there is one more option. i have updated my answer. plz have a lookMarijo

© 2022 - 2024 — McMap. All rights reserved.