I\'m having some issues implementing a TimePicker in my application that allows the user to change the time of a database record prior to inserting it.
The problem is th
i make this method thats return true if the TimePicker select AM and false if the TimePicker select PM. note: the suppresLint is for Api 8 don't work .getvalue() statement
Saludos!! :)
@SuppressLint("NewApi")
private boolean isAM(TimePicker timePicker){
NumberPicker numberPickerAmPm = (NumberPicker)((ViewGroup) timePicker.getChildAt(0)).getChildAt(3);
if(numberPickerAmPm.getValue()==0){
//sendToast("es am");
return true;
}else{
//sendToast("es pm");
return false;
}
}