Thanks for replying. On 14 February 2011 23:44, TreKing <[email protected]> wrote:
> On Mon, Feb 7, 2011 at 1:49 AM, andrewg_oz <[email protected]>wrote: > >> 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. >> > > Don't "wrap the whole lot in a ScrollView" - wrap the part you want to > scroll (i.e., the TextView) and leave the CheckBox outside by itself. > This is what I've tried: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content"> <TextView android:id="@+id/comments" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text=""/> </ScrollView> <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content"> <TextView android:id="@+id/comment_label" android:layout_below="@id/comments" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/comment_label"/> <EditText android:id="@+id/comment" android:layout_alignTop="@id/comment_label" android:layout_toRightOf="@id/comment_label" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@android:drawable/editbox_background"/> <CheckBox android:id="@+id/close" android:layout_below="@id/comment" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:text="@string/edit_close"/> </RelativeLayout> </LinearLayout> I've also tried "wrap_parent" for the LinearLayout height, but no change. The problem is that once the TextView gets really big, none of the controls in the RelativeLayout are visible. Yes there is more than just a checkbox now - requirements change :-( I suspect the problem might be that Android can only layout "top down". Once the TextView has been sized, it won't be shrunk to allow the RelativeLayout to fit. At least I just haven't been able to get a working "flexy-size" view anywhere other than as the last view. Maybe there's some magic in the layouts somewhere, but I haven't been able to find it. Thanks for any help... -- Andrew -- 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

