Android - OnDateChangedListener - how do you set this? -


there event listener in android called datepicker.ondatechangedlistener. trying set datepicker view's on date changed listener follows:

datepicker dp = new datepicker(getcontext()); dp.setondatechangedlistener(this);  //where activity extends datepicker.ondatechangedlistener 

but guess what? date picker not have method called setondatechangedlistener.

my question is:

  1. how set date changed listener in android?
  2. if not possible set date changed listener, purpose event?

any documentation/tutorials helpful.

once you've created datepicker, need initialise date want display @ first. that's point @ can add listener.

see datepicker.init(int, int, int, ondatechangedlistener).


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -