Hi all. I have a custom dialog, which contains a WebView. If the
content of the webview is too much, the dialog size is too high for
the screen, and the 'ok' button drops off the bottom of the screen. I
can't seem to find a way to limit the size of the dialog. I can
achieve it with "layoutHeight" but that's no good, as I want it to
wrap when there is less text. The element maxHeight seems to have no
effect.

Also, the button gets pushed out of the view, even though I have
specified a layout weight.

Any ideas please?


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
        android:id="@+id/dialog_root"
    android:orientation="vertical"
    android:layout_height="wrap_content"
    android:layout_width="wrap_content"
        android:gravity="center"
        android:layout_gravity="center"
        android:paddingLeft="10dip"
    android:paddingRight="10dip"
        >


        <LinearLayout
            android:orientation="horizontal"
        android:layout_width="240dip"
        android:layout_height="wrap_content"
        android:paddingBottom="10dip"
        android:gravity="center"
            >

        <WebView android:id="@+id/help_text"
                        android:layout_width="fill_parent"
                        android:layout_height="wrap_content"
                        android:scrollbars=""
                  />

         </LinearLayout>

        <LinearLayout
        android:orientation="horizontal"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:paddingTop="10dip"
        android:paddingBottom="10dip"
        android:gravity="center"
        >

                <ImageButton
                        android:id="@+id/help_button"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:src="@drawable/bt_selector_ok"
                        android:background="@null"
                        android:gravity="center"
                />

    </LinearLayout>

</LinearLayout>

-- 
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