Friday, 15 May 2015

Android - How can I determine an appropriate height for my ListView items? -



Android - How can I determine an appropriate height for my ListView items? -

i building android app listview. coming ios used setting fixed pixel heights list view items, since screen sizes of used devices same. android, wondering way dynamically set heights of listview items it looks nice on screen sizes?

in android there 2 famous properties. are:

match_parent formerly fill_parent using property layout width or height expand view parents width or height minus margins wrap_content using property layout width or height allow view take much space required or available(if exceeds screen dimension exception within scrollable views)

so tag set both width , height match_parent. , in custom row might populating set root layout width match_parent , height wrap_content.

note: in android while give fixed height @ times not practice.

android android-layout android-listview

No comments:

Post a Comment