Android: wrap_content is not working with ListView -
i working on android. want list view wrap content horizontally , not fill width. wrap_content properties not working. do?
as romain guy (google engineer works on ui toolkit) said in post
by setting width wrap_content
you telling listview wide widest of children. listview must therefore measure items , items has call getview() on adapter. may happen several times depending on number of layout passes, behavior of parent layout, etc.
so if set layout width or layout height of listview wrap_content
listview try measure every single view attached - not want.
keep in mind: avoid setting wrap_content
listviews or gridviews @ times, more details see google i/o video talking world of listview
Comments
Post a Comment