I want to show month and year only, how i can do it? I have been try to search some solution but for me it's not work. May be i need to create my custom date picker dialog ? Here is my code:
DatePickerDialog.OnDateSetListener d = new DatePickerDialog.OnDateSetListener()
{
public int Syear;
public int Smonth;
@Override
public void onDateSet(DatePicker view, int year, int monthOfYear,
int dayOfMonth) {
calendar.set(Calendar.YEAR, year);
calendar.set(Calendar.MONTH,monthOfYear);
@Override
public void onScrollStateChanged(AbsListView view,
int scrollState) {
// Auto-generated method stub
}
});
}
};
public void setDate()
{
new DatePickerDialog(InboxActivity.this,d,calendar.get(Calendar.YEAR),calendar.get(Calendar.MONTH),calendar.get(Calendar.DAY_OF_MONTH)).show();
}
@Override
public void onClick(View v)
{
this.setDate();
}