Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - Standard height of toolbar

I want to create a toolbar in my app, and I am wondering what is the standard height for the toolbar in android?

I want it to be big enough for a finger, but not huge. Is there standard size?

like image 717
nrofis Avatar asked Oct 20 '12 11:10

nrofis


People also ask

What is the standard Toolbar height in android?

The Toolbar (if not extended) has the height of: 56dp (default)

What is Toolbar size?

By default, the image size is set to the dimensions of 16 by 15 pixels. All buttons are the same width, by default 24 by 22 pixels. A toolbar's height is determined by the height of the buttons, and a toolbar's width is the same as the width of the parent window's client area, also by default.

How do I change the size of my taskbar on Android?

You can set the height here android:minHeight="? attr/actionBarSize" in your XML. Use height and not minHeight.


2 Answers

Its best to use ?attr/actionBarSize as @Jaison Brooks commented.

In the material guidelines, suggested height is 56dp:

Toolbar: 56dp

like image 195
Vedant Agarwala Avatar answered Sep 18 '22 09:09

Vedant Agarwala


The recommended minimum size for touchable elements is 48 dp, see this page for more detailed metrics.

like image 34
molnarm Avatar answered Sep 21 '22 09:09

molnarm