Android list view - Human interface guidelines

1k Views Asked by At

Is there any recommendation on how big each cell has to be in terms of dp in a listview. (Assume a list view with just one line of text)?

Thanks,
Teja

3

There are 3 best solutions below

0
Selvin On BEST ANSWER

if "how big each cell" means row height then

android:layout_height="?android:attr/listPreferredItemHeight"

should help

0
balazsbalazs On

Addition to Selvin's answer.

If you want it from source code:

R.attr.listPreferredItemHeight
0
Diego Frehner On

Via Code:

R.attr.listPreferredItemHeight is only the resource id and not the value.

this works: Android: how to get value of "listPreferredItemHeight" attribute in code?