2011-10-05 15 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

回答