答案 0 :(得分:1)
这取决于你的SDK版本。如果您确实需要在旧版Android上使用相同的外观,则可以使用此库。我以前用过它真棒!它需要API 14(冰淇淋三明治)
https://github.com/wdullaer/MaterialDateTimePicker
也许值得查看这个图书馆:
https://github.com/vikramkakkar/SublimePicker
答案 1 :(得分:0)
val tableData = sc.newAPIHadoopRDD(
conf,
classOf[GsonBigQueryInputFormat],
classOf[LongWritable],
classOf[JsonObject]).
显示时间选择器,
public static class TimePickerFragment extends DialogFragment
implements TimePickerDialog.OnTimeSetListener {
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
// Use the current time as the default values for the picker
final Calendar c = Calendar.getInstance();
int hour = c.get(Calendar.HOUR_OF_DAY);
int minute = c.get(Calendar.MINUTE);
// Create a new instance of TimePickerDialog and return it
return new TimePickerDialog(getActivity(), this, hour, minute,
DateFormat.is24HourFormat(getActivity()));
}
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
// Do something with the time chosen by the user
}
答案 2 :(得分:0)