Dialog, LinearLayout, ScrollView size issues
Posted
by Sean
on Stack Overflow
See other posts from Stack Overflow
or by Sean
Published on 2010-05-20T02:07:59Z
Indexed on
2010/05/20
3:00 UTC
Read the original article
Hit count: 452
android
|android-widget
I'm building a dialog class which inherits from Dialog, and all internal UI is programmatic. It's structured in the following way:
Dialog
+LinearLayout
++TextView
++ScrollView
+++LinearLayout
++++ListView
Unfortunately, when I show() the Dialog, it's too short. I'd like it to maximize and cover as much of the screen as possible, but only when there are enough items in the ListView to warrant it.
I haven't found my answer in the docs, and I haven't been able to get it to work by setting WRAP_CONTENT as layout parameters, or setting heights manually.
What is the proper way to approach this?
Thanks, Sean
© Stack Overflow or respective owner