I want to set the height of ActionBar to 80dp but the way I did it is not working:
<style name="LargeActionBar" parent="Base.Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primary_dark</item>
<item name="colorAccent">@color/accent</item>
<item name="actionBarStyle">@style/LargeActionBar.Large</item>
<item name="android:actionBarStyle">@style/LargeActionBar.Large</item>
</style>
<style name="LargeActionBar.Large" parent="Base.Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="android:background">@color/primary</item>
<item name="android:height">80dp</item>
<item name="height">80dp</item>
<item name="actionBarSize">80dp</item>
</style>
Activity:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_compra);
Bundle args = getIntent().getExtras();
if (args != null) {
idLista = args.getString("nomeLista");
}
ActionBar actionBar = getSupportActionBar();
setTheme(R.style.LargeActionBar);
actionBar.setDisplayShowHomeEnabled(false);
actionBar.setDisplayShowTitleEnabled(false);
LayoutInflater inflater = LayoutInflater.from(this);
View customView = inflater.inflate(R.layout.layout_actionbar,null);
actionBar.setCustomView(customView);
actionBar.setDisplayShowCustomEnabled(true);