I've been creating custom dialogs using the SDK docs:

http://developer.android.com/guide/topics/ui/dialogs.html#CustomDialog

What I've wanted to do is have a dialog with an extra checkbox below a
large chunk of text, so large in some cases that the text has to
scroll. The checkbox should be stuck at the bottom, always visible,
with the text above it. The dialog should resize as required to fit
the text, until the text can't fit and the text has to scroll.

I found that I could put the checkbox as a custom view as described in
the docs, and I could use setMessage for the text - and the text would
scroll - just like I wanted. The problem was as the text got long to
the point where it needed to scroll, it would also push the checkbox
view down beneath the dialog buttons where it couldn't be seen or
touched!

I've worked around this problem by adding a TextView to the View above
the Checkbox, then wrapping the whole lot in a ScrollView. The dialog
grows and shrinks with the message, the only issue being that the
Checkbox can scroll out of view, but at least it's still accessible.

The closest I've got is assigning a fixed height to the TextView, but
having to define a layout for every possible screen size and
orientation seems absurd, yet I can't think of any other way to end up
with an ideal layout.

Is this possible? Can anyone help me out here? Thanks.

-- 
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]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to