Date Picker Dialog Given error for bad tocken exception in android How to resolve?

The problem is in onCreateDialog protected Dialog onCreateDialog(int id) { switch (id) { case TIME_DIALOG_ID: return new TimePickerDialog(--**this**--, mTimeSetListener, mHour, mMinute, false); case DATE_DIALOG_ID: return new DatePickerDialog(--**this**--, mDateSetListener, mYear, mMonth, mDay); } return null; } instead of this replace it with getParent() Here the Exception you are getting is due to Context you are passing is not correct. Try to pass the Context of your activity in case the Activity is in Tab unser TabLayout pass the Context of your TabActivity.

The problem is in onCreateDialog. Protected Dialog onCreateDialog(int id) { switch (id) { case TIME_DIALOG_ID: return new TimePickerDialog(--**this**--, mTimeSetListener, mHour, mMinute, false); case DATE_DIALOG_ID: return new DatePickerDialog(--**this**--, mDateSetListener, mYear, mMonth, mDay); } return null; } instead of this replace it with getParent(). Here the Exception you are getting is due to Context you are passing is not correct.

Try to pass the Context of your activity. In case the Activity is in Tab unser TabLayout pass the Context of your TabActivity.

Thanks dude. Its working .. – Sawan Modi Jun 20 at 5:33.

Replace your protected Dialog onCreateDialog(int id) method with these lines. The problem is with the context. Switch (id) { case DATE_DIALOG_ID: return new DatePickerDialog(getParent(), mDateSetListener, mYear, mMonth, mDay); case TIME_DIALOG_ID: return new TimePickerDialog(getParent(), mTimeSetListener, mHour, mMinute, false); }.

For a dialog using this view, see DatePickerDialog. The callback used to indicate the user changed the date. The text color list of the calendar.

Whether the calendar view is shown.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions