android.widget.TimePicker.setMinute()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(93)

本文整理了Java中android.widget.TimePicker.setMinute()方法的一些代码示例,展示了TimePicker.setMinute()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TimePicker.setMinute()方法的具体详情如下:
包路径:android.widget.TimePicker
类名称:TimePicker
方法名:setMinute

TimePicker.setMinute介绍

暂无

代码示例

代码示例来源:origin: ankidroid/Anki-Android

@Override
public void setTime(TimePicker picker, int hour, int minute) {
  picker.setHour(hour);
  picker.setMinute(minute);
}

代码示例来源:origin: SecUSo/privacy-friendly-pedometer

protected void setMinute(TimePicker timePicker, int minute) {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
    timePicker.setMinute(minute);
  } else {
    timePicker.setCurrentMinute(minute);
  }
}

代码示例来源:origin: renyuneyun/Easer

private static void setTimePicker(TimePicker timePicker, Calendar calendar) {
  int hour, minute;
  hour = calendar.get(Calendar.HOUR_OF_DAY);
  minute = calendar.get(Calendar.MINUTE);
  if (Build.VERSION.SDK_INT >= 23) {
    timePicker.setHour(hour);
    timePicker.setMinute(minute);
  } else {
    timePicker.setCurrentHour(hour);
    timePicker.setCurrentMinute(minute);
  }
}

代码示例来源:origin: renyuneyun/Easer

private static void setTimePicker(TimePicker timePicker, Calendar calendar) {
  int hour, minute;
  hour = calendar.get(Calendar.HOUR_OF_DAY);
  minute = calendar.get(Calendar.MINUTE);
  if (Build.VERSION.SDK_INT >= 23) {
    timePicker.setHour(hour);
    timePicker.setMinute(minute);
  } else {
    timePicker.setCurrentHour(hour);
    timePicker.setCurrentMinute(minute);
  }
}

代码示例来源:origin: Joysing/AlipayAutoGetForest

private void updateUI() {
  int hour = mShareUtil.getInt(Config.KEY_HOUR, -1);
  int minute = mShareUtil.getInt(Config.KEY_MINUTE, -1);
  if (hour == -1 && minute == -1) {
    // do nothing
  } else {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
      timepick.setHour(hour);
      timepick.setMinute(minute);
    }
  }
}

代码示例来源:origin: quemb/QMBForm

@SuppressWarnings("deprecation")
@Override
protected void initDatePicker(Calendar calendar) {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
  {
    mTimePicker.setHour(calendar.get(Calendar.HOUR_OF_DAY));
    mTimePicker.setMinute(calendar.get(Calendar.MINUTE));
  }
  else
  {
    mTimePicker.setCurrentHour(calendar.get(Calendar.HOUR_OF_DAY));
    mTimePicker.setCurrentMinute(calendar.get(Calendar.MINUTE));
  }
  mTimePicker.setOnTimeChangedListener(this);
  if (DateFormat.is24HourFormat(getContext()))
      mTimePicker.setIs24HourView(true);
}

代码示例来源:origin: denzilferreira/aware-client

timePicker.setMinute(minute);
} else {
  timePicker.setCurrentMinute(minute);

代码示例来源:origin: stackoverflow.com

} else {
  picker.setHour(lastHour);
  picker.setMinute(lastMinute);

代码示例来源:origin: Gwokhov/Deadline

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
  timePicker.setHour(mCalendar.get(Calendar.HOUR_OF_DAY));
  timePicker.setMinute(mCalendar.get(Calendar.MINUTE));
} else {
  timePicker.setCurrentHour(mCalendar.get(Calendar.HOUR_OF_DAY));

相关文章