Design Guidelines - Size Doesn't Fold

I'm currently wading through Google Design Guides , and I'm struggling to implement parts of it in my application.

Next Example: Lists (Multiline) - Avatar with text

Dimensions:

Primary text font: Roboto Regular 16sp
Additional font for text: Roboto Regular 14sp
Tile height: 72dp
Left avatar: 16dp
Text pad , left: 72dp
Text pad , top and bottom: 20dp

So, the recommendations indicate that the list item with the avatar and the main / secondary text should have a top / bottom text fill of 20dp, and the height of the presentation - 72dp. If I implement the above, I will get the XML as follows:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="72dp"
    android:background="#FFF">

    <TextView
        android:id="@+id/primary_text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:fontFamily="sans-serif"
        android:paddingLeft="72dp"
        android:paddingRight="16dp"
        android:paddingTop="20dp"
        android:singleLine="true"
        android:text="Primary text"
        android:textSize="16sp" />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@id/primary_text"
        android:fontFamily="sans-serif"
        android:paddingBottom="20dp"
        android:paddingLeft="72dp"
        android:paddingRight="16dp"
        android:singleLine="true"
        android:text="Secondary text with preview of further content"
        android:textSize="14sp" />

</RelativeLayout>

And how it looks in the graphic layout editor

graphical layout preview

As you can see, secondary text is disabled. And it gets even worse when I look at it on the device:

real device

So my question is: is this another โ€œWTF Googleโ€ thing or is there something I misunderstood?

Note: โ€œJust increase the height to X dp and your problem has been fixedโ€ is not a sufficient answer for me, as the recommendations are so specific with regard to these sizes.

+4
1

, 72dp.

android:layout_height="72dp"

layout_height "wrap_content", - , .

0

All Articles