I have a custom dialog window with title, message and 2 buttons. When the text of one of the buttons wraps to 3 lines, the bottom of the button is chopped off. I would like to have the window height enlarged automatically so that the full button is displayed. Can someone help me in this problem?
Since I do not have enough reps to post a screen captures I included 2 links. http://212.150.56.58:8080/q/Doc10.htm shows the dialog with short text in the button, and http://212.150.56.58:8080/q/Doc11.htm shows the dialog with the problem I want to fix.
Dialog.xml
<?xml version="1.0" encoding="utf-8"?>
<TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tableLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/border_white_inside_black"
>
<TextView
android:id="@+id/txt_dialog_title"
android:gravity="center"
android:text="@string/shut_down"
android:textStyle="bold"
android:textSize="22sp"
android:textColor="@android:color/white"
android:layout_marginTop="11dp"
android:layout_marginBottom="11dp"
/>
<TableLayout
android:id="@+id/layout_dialog_content"
android:background="@drawable/border_white_inside_offwhite_round_bottom"
android:layout_height="wrap_content"
>
<TableRow
android:layout_height="wrap_content"
android:id="@+id/tableRow2"
android:padding="5dip" >
<TextView
android:id="@+id/txt_dialog_message"
android:layout_span="2"
android:text="@string/are_u_sure_close_msg"
android:textSize="16sp"
android:textColor="@android:color/black"
android:textStyle="normal"
android:gravity="center"
android:layout_marginTop="25dp"
android:layout_marginBottom="25dp"
android:layout_width="wrap_content"
android:ellipsize="none"
android:singleLine="false"
android:scrollHorizontally="false"
android:layout_weight="1"
android:maxLines="3"
/>
</TableRow>
<TableRow
android:layout_height="wrap_content"
android:id="@+id/tableRow3"
android:layout_marginBottom="15dp"
>
<Button
android:id="@+id/dialogButtonClose"
android:text="Cancel"
android:textColor="@android:color/black"
android:textStyle="bold"
android:textSize="18sp"
android:background="@drawable/border_round_corners_thin_blue"
android:layout_marginRight="10dp"
android:layout_marginLeft="15dp"
android:layout_marginEnd="10dp"
android:layout_marginStart="15dp"
android:minHeight="35dp"
android:minWidth="130dp"
android:layout_width="130dp"
android:ellipsize="none"
android:singleLine="false"
android:scrollHorizontally="false"
android:layout_weight="1"
android:maxLines="3"
/>
<Button
android:id="@+id/dialogButtonCancel"
android:text="Shut Down"
android:textColor="@android:color/black"
android:textStyle="bold"
android:textSize="18sp"
android:background="@drawable/border_round_corners_thin_blue"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:minHeight="35dp"
android:minWidth="130dp"
android:layout_width="130dp"
android:ellipsize="none"
android:singleLine="false"
android:scrollHorizontally="false"
android:layout_weight="1"
android:maxLines="3"
/>
</TableRow>
</TableLayout>
</TableLayout>