Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is Material Design's recommended padding for the entire screen background?

The Material Design specification has given detailed metrics for individual components (i.e. Views) but I couldn't find the recommended padding for an entire background layout.

For example, in the following screenshot taken from Material Design Guide, the SearchView is at a distance from the boundary of the background layout, and so will be other Views if/when added to this layout (I guess). So it looks like there is a padding for the full screen background layout in Material Design apps.

What is the recommended value of that?

enter image description here

like image 383
Solace Avatar asked May 22 '16 18:05

Solace


People also ask

What is padding in UI Design?

Padding refers to the space between UI elements. Padding is an alternative spacing method to keylines and is measured in increments of 8dp or 4dp. Padding can be measured both vertically and horizontally and does not need to span the whole height of a layout. A layout with 24dp padding between components.

What is padding in layout?

Padding is the space inside the border, between the border and the actual view's content. Note that padding goes completely around the content: there is padding on the top, bottom, right and left sides (which can be independent).

What are material components?

Material Components are interactive building blocks for creating a user interface, and include a built-in states system to communicate focus, selection, activation, error, hover, press, drag, and disabled states. Component libraries are available for Android, iOS, Flutter, and the web.

What is DP in Material Design?

Density-independent pixels (dp) Density-independent pixels (pronounced “dips”) are flexible units that scale to uniform dimensions on any screen. When developing an Android application, use dp to display elements uniformly on screens with different densities.


3 Answers

Usually, the padding is added to your project if you use Android Studio to create the project. It's value depends on the screen size. For handheld devices, its value is 16dp for top/bottom/right/left and for tablets it is 64dp right/left and 16dp for top/bottom.

like image 129
Sazid Avatar answered Sep 28 '22 03:09

Sazid


AFAIK, the default activity padding is 16dp, so I guess the recommended amount must be also 16dp. Anyway, it depends on your screen size.

like image 31
Ukubu Avatar answered Sep 28 '22 04:09

Ukubu


="@dimen/activity_horizontal_margin"
="@dimen/activity_vertical_margin"
like image 30
apelsoczi Avatar answered Sep 28 '22 05:09

apelsoczi