2011-03-07 28 views
1

嘿夥計, 我放置在LinearLayout中的一個機器人的DatePicker通過xml的Android的DatePicker與標題

<DatePicker 
    android:id="@+id/birthday" 
    android:layout_marginLeft="10px" 
    android:layout_marginRight="10px" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" /> 

,當它有它不具有時鐘圖標標題,星期幾,日和月份名稱與年份(ico Mon,2008年8月4日),就像在對話框中顯示DatePicker一樣。
有沒有人知道如何添加此信息?

回答

1

這些項目出現在日期選擇器對話框中,如果需要,可以在佈局中手動添加它們。更新它們的邏輯可以在datepicker對話框的源文件中找到。但是,如果您需要日期選擇器對話框功能,爲什麼不使用日期選擇器對話框?

參考這個例子 http://developer.android.com/resources/tutorials/views/hello-datepicker.html

+0

謝謝,我會嘗試從源弄清楚。爲什麼我不使用對話框,因爲它已經嵌套在自定義首選對話框中,並且不適合從對話框調用新對話框。 – Maxim 2011-03-08 14:53:29