如何使用EditText和DatePicker创建对话框

时间:2013-03-08 23:46:56

标签: android dialog datepicker android-alertdialog

我正在尝试使用EditText和DatePicker创建一个Dialog。 不幸的是,我无法自定义DatePickerDialog并且XML DatePicker非常糟糕(它显示了一个小日历,我不需要它)。

我当前的自定义对话框是:

<EditText
    android:id="@+id/title"
    android:inputType="textEmailAddress"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="16dp"
    android:layout_marginLeft="4dp"
    android:layout_marginRight="4dp"
    android:layout_marginBottom="4dp"
    android:hint="Title" />
<DatePicker 
    android:id="@+id/ad_date_picker"
    android:layout_height="wrap_content"
    android:layout_width="wrap_content"
    android:layout_margin="5dp"/>

有人可以解释我该怎么办?

谢谢!

0 个答案:

没有答案
相关问题