2011-10-05 47 views
1

在我的屏幕上使用了日期選擇器。但問題是它顯示不正確的手段..看到這個圖像:在Android中的日期選擇器顯示問題

enter image description here 你可以看到那裏,年正在削減。爲什麼它發生。

編輯:

@Override 
    protected Dialog onCreateDialog(int id) { 
     Calendar c = Calendar.getInstance(); 
     int cyear = c.get(Calendar.YEAR); 
     int cmonth = c.get(Calendar.MONTH); 
     int cday = c.get(Calendar.DAY_OF_MONTH); 
     switch (id) { 
     case DATE_DIALOG_ID: 
      return new DatePickerDialog(this, mDateSetListener, cyear, cmonth, cday); 
     } 
     return null; 
    } 
    private DatePickerDialog.OnDateSetListener mDateSetListener = new DatePickerDialog.OnDateSetListener() { 
     // onDateSet method 
     public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) { 



      //Toast.makeText(VideoPush.this, "Selected Date is ="+date_selected, Toast.LENGTH_SHORT).show(); 
     } 
    }; 

當我點擊的TextView正在打開此對話框。

+0

這是你必須有一個漂亮的自定義主題。這可能是問題所在。你能顯示你用來創建對話框的代碼嗎? – Felix

+0

代碼編輯請檢查..thanx(我在這裏沒有使用任何主題) – Udaykiran

+0

什麼是設備?看起來像三星主題 – ernazm

回答