https://github.com/byteszero/mytimedialog
自定义的Timepicker,有可以设置起始时间和结束时间
https://github.com/byteszero/mytimedialog
Last synced: about 1 month ago
JSON representation
自定义的Timepicker,有可以设置起始时间和结束时间
- Host: GitHub
- URL: https://github.com/byteszero/mytimedialog
- Owner: BytesZero
- License: apache-2.0
- Created: 2015-05-11T06:18:05.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-05-11T06:54:16.000Z (about 10 years ago)
- Last Synced: 2025-03-24T14:46:17.284Z (2 months ago)
- Language: Java
- Size: 379 KB
- Stars: 6
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MyTimeDialog
自定义的Timepicker,有可以设置起始时间和结束时间
###效果1,系统默认时间

```java
new MyTimeDialog(MainActivity.this,"设置时间", new MyTimeDialog.TimeSetListener() {
@Override
public void onSetTime(int startHour, int startMin, int endHour, int endMin) {
String content=startHour+":"+startMin+" "+endHour+":"+endMin;
showToast(content);
}@Override
public void onCancel() {}
}).show();
```
###效果2,自定义时间

```java
new MyTimeDialog(MainActivity.this, "自定义时间",3,24,5,45, new MyTimeDialog.TimeSetListener() {
@Override
public void onSetTime(int startHour, int startMin, int endHour, int endMin) {
String content=startHour+":"+startMin+" "+endHour+":"+endMin;
showToast(content);
}@Override
public void onCancel() {}
}).show();
```