Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mCalendar = Calendar.getInstance();
- DatePickerDialog.OnDateSetListener date = new DatePickerDialog.OnDateSetListener() {
- @Override
- public void onDateSet(DatePicker view, int year, int monthOfYear,
- int dayOfMonth) {
- // Here I want to check if the date is good.
- // if its good - call GetPlayersList()
- // if not - raise a message and let user choose again
- mCalendar.set(Calendar.YEAR, year);
- mCalendar.set(Calendar.MONTH, monthOfYear);
- mCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);
- new GetPlayersList().execute(Utilities
- .getAccessToken(AttendanceActivity.this));
- }
- };
- new DatePickerDialog(AttendanceActivity.this, date,
- mCalendar.get(Calendar.YEAR), mCalendar.get(Calendar.MONTH),
- mCalendar.get(Calendar.DAY_OF_MONTH)).show();
- int dayOfWeek = mCalendar.get(Calendar.DAY_OF_WEEK);
- if(dayOfWeek == 3) {
- // it is a Wednesday
- } else {
- // it is not a Wednesday
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement