Mixing Material Design for Android Listed

I designed a 2-line text layout for a list box, as indicated in the material specification.

Primary text font: Roboto Regular 16sp
Secondary text font: Roboto Regular 14sp
Tile height: 72dp
Text padding, left: 16dp
Text padding, top and bottom: 20dp

it shows approval on the android studio design design display, but when I launch it on the 7inch samsung tab it is cut off like this enter image description here I know if you move some dp from here to there then this problem will be fixed, but before that I just want to know that if I am mistaken or does the manual have any special chapter for the DP value for tablets?

+4
source share
1 answer

Material Design is not intended for programmers, but for designers. This is why recommendations are hard to implement.

, Roboto. TextViews paddings, , .

enter image description here

, :

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:background="#ffffffff"
    android:paddingLeft="16dp"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="72dp">

    <TextView
        android:layout_alignParentTop="true"
        android:layout_marginTop="20dp"
        android:paddingTop="11dp"
        android:id="@+id/topMarker"
        android:layout_width="1dp"
        android:layout_height="1dp"
        android:textSize="1dp" />

    <TextView
        android:layout_alignParentBottom="true"
        android:layout_marginBottom="20dp"
        android:padding="0dp"
        android:gravity="center"
        android:id="@+id/bottomMarker"
        android:layout_width="1dp"
        android:layout_height="1dp"
        android:textSize="1dp" />

    <TextView
        android:layout_alignBaseline="@+id/topMarker"
        android:text="Primary text"
        android:textSize="16sp"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

    <TextView
        android:layout_alignBaseline="@+id/bottomMarker"
        android:text="Secondary text"
        android:textSize="14sp"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

</RelativeLayout>

, , beacuse Android . .

Edit:

. . : https://androidreclib.wordpress.com/2016/03/10/aligning-text-on-android/

+11

All Articles