Hello again...
I have a widget which is a TimePicker that retrieves the time saved in a field in a database.
Thing is that when the user changes the time value in the widget, this is not being saved in the database.
So I came across the setOnTimeChangedListener method that works like a charm, if you are only using the plus and minus signs in the widget. It does not capture the change if you are using the keyword.
Here is my code:
pickedTime.setOnTimeChangedListener(new TimePicker.OnTimeChangedListener() {
public void onTimeChanged(TimePicker arg0, int arg1, int arg2) {
System.out.println("What time is it? "
+ String.valueOf(arg0.getCurrentHour()) + ":"
+ String.valueOf(arg0.getCurrentMinute()));
}
});
I've also tried unsuccessfully:
pickedTime.setOnFocusChangeListener and pickedTime.setOnKeyListener methods.
Thanks in advance,
monn3t