Android Design spec for listview looks wrong -


i have listview inside navigation drawer, , consulting design spec set out android (https://www.google.com/design/spec/components/lists.html#lists-specs)

my list items have 2 lines of text:

<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="72dp" android:paddingtop="20dp" android:paddingbottom="20dp" android:paddingleft="16dp" android:paddingright="16dp">  <textview     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:text="large text"     android:id="@+id/title"     android:textsize="16sp" />  <textview     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:text="small text"     android:id="@+id/note"     android:textsize="14sp" /> </linearlayout> 

all dimensions according spec.

here screenshot, can see, 2nd line cut off.

enter image description here

any ideas why, when using guideline specs, it's wrong?

on linearlayout, remove android:paddingtop , android:paddingbottom, , use android:gravity="center_vertical" instead.

<linearlayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="match_parent"     android:layout_height="72dp"     android:gravity="center_vertical"     android:orientation="vertical"     android:paddingleft="16dp"     android:paddingright="16dp">      <textview ... />      <textview ... /> </linearlayout> 

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -