olijf
Newbie
hi all, I'm a beginning android developer. I am creating simple apps to learn more and the basics. however I didn't get past this one...
this is what I created. problem is when the button is pushed, you get in the toast : "It's : Thursday today". even after changing dates... clearly there is something wrong but I can't find what I am doing wrong.
need help. if you need any more information to help, post it.
Thanks in Advance
~Olijf
Code:
public void GetDay (View view){
if (view == mBtnDay){
Calendar cal = Calendar.getInstance();
int day = mDpDate.getDayOfMonth();
int month = mDpDate.getMonth();
int year = mDpDate.getYear();
cal.set(year, month, day);
DateFormat formatter = new SimpleDateFormat("EEEE");
String date = formatter.format(cal.get(Calendar.DAY_OF_WEEK));
Toast.makeText(this, "It's :"+ date + " today", Toast.LENGTH_LONG).show();
}
}
need help. if you need any more information to help, post it.
Thanks in Advance
~Olijf