Skip to content

Instantly share code, notes, and snippets.

@dingbuoyi
Created June 15, 2018 03:31
Show Gist options
  • Save dingbuoyi/a0d1b3e77e6b75b64f4f6ff03b2b039c to your computer and use it in GitHub Desktop.
Save dingbuoyi/a0d1b3e77e6b75b64f4f6ff03b2b039c to your computer and use it in GitHub Desktop.
var c = Calendar.getInstance()
c.timeInMillis = System.currentTimeMillis()
val hour = c.get(Calendar.HOUR_OF_DAY)
val minute = c.get(Calendar.MINUTE)
TimePickerDialog(context, TimePickerDialog.OnTimeSetListener { _, _, _ ->
}, hour, minute, true).show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment