user interface - Android - Get ListView item height? -
There is no way to get the visibility height of the list in the list, when there is no real object in the list?
My list view value layout:
& lt; LinearLayout xmlns: Android = "http://schemas.android.com/apk/res/android" Android: layout_width = "fill_parent" Android: layout_height = "Android: attr / listPreferredItemHeight" & gt; ... & lt; / LinearLayout & gt;
I tried to use it using the infix:
view convert = layoutinflator.frame (this) .inflate (R.layout.mail_list_row, Null); Int itemHeight = convertviewweight ();
but its return 0;
Thank you!
A visual width and height is specified in Android, when its rendering will be completed. So long as you do not provide the list at least, you will not get the list. IightHeight can solve your problem so that you set the height of some items so that you work hard at least instead of hard coding height and width Able to
Comments
Post a Comment