Skip to content

Instantly share code, notes, and snippets.

@jddeep
Created May 9, 2019 10:23
Show Gist options
  • Save jddeep/93129855dbf8722d3cb2f770d12318f8 to your computer and use it in GitHub Desktop.
Save jddeep/93129855dbf8722d3cb2f770d12318f8 to your computer and use it in GitHub Desktop.
timeButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Calendar now = Calendar.getInstance();
TimePickerDialog tpd = TimePickerDialog.newInstance(
NewItem.this,
now.get(Calendar.HOUR_OF_DAY),
now.get(Calendar.MINUTE),
false
);
tpd.show(getFragmentManager(), "Timepickerdialog");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment