Hey folks,

I've created a custom class that extends Dialog and have a custom view
I use inside it.  When the dialog is activated, it looks like this:

http://img.waffleimages.com/278aad1d375a3e73c87189beac335c5d7100c8b5/device.png

It only seems to increase in width as I type into text boxes.  I've
tried to override the layout attributes of the dialog below, but it
still doesn't seem to stretch out to fit the screen.  I've also
included the XML for the view I want inside the dialog.

Can anyone suggest anything?

@Override
        public void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                this.setTitle("Create New List");
                setContentView(R.layout.dialog_create_new_list);
                LayoutParams params = getWindow().getAttributes();
                params.height = LayoutParams.FILL_PARENT;
                getWindow().setAttributes(params);
                .....
                .....


<?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"
                android:theme="@android:style/Theme.Dialog">
<ScrollView
            android:layout_width="fill_parent"
        android:layout_height="wrap_content">
  <LinearLayout
            android:orientation="vertical"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent">

            <TextView
                android:id="@+id/label_enter_list_name"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="Enter List Name" />
            <EditText
                android:id="@+id/edit_enter_list_name"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content" />
            <TextView
                android:id="@+id/label_select_list_type"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="Select List Type" />
            <Spinner
                android:id="@+id/spinner_select_list_type"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content" />
            <TextView
                android:id="@+id/label_enter_list_description"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="Enter List Description" />
            <EditText
                android:id="@+id/edit_enter_list_description"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content" />
            <TextView
                android:id="@+id/label_pick_list_icon"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="Pick List Icon" />
            <ImageButton
                android:id="@+id/imagebutton_pick_list_icon"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:src="@drawable/icon" />
            <LinearLayout
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
        <Button
          android:id="@+id/button_create_new_list"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:text="Create List" />
        <Button
          android:id="@+id/button_cancel_new_list"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:text="Cancel" />
      </LinearLayout>
</LinearLayout>
</ScrollView>
</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