patrick wrote: > I want to set the height of a ListView during run-time of my > application. It seems that setPreferredHeight(int) doesn't do this job > and I can't find any similar function.
I haven't tried this, but here are two ideas: 1. It's possible you need to call requestLayout() on the ListView (or possibly the ListView's parent) after calling setPreferredHeight() to affect the change. 2. It's also possible that you really need to adjust the height field of the LayoutParams for your ListView (obtained through getLayoutParams()), then call requestLayout(). Check out the Layout section of the View class documentation to see what I mean: http://code.google.com/android/reference/android/view/View.html If either of those work, let us know! -- Mark Murphy (a Commons Guy) http://commonsware.com The Busy Coder's Guide to Android Development -- coming in June 2008! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

