日期時間選擇器
阿新 • • 發佈:2018-12-11
Date date = new Date(); //獲取當前時間 SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm"); String format1 = format.format(date); TimeSelector timeSelector = new TimeSelector(MainActivity.this, new TimeSelector.ResultHandler() { @Override public void handle(String time) { //設定到文字框 mTime.setText(time); } }, format1, "2050-1-1 24:00"); timeSelector.show();
implementation 'com.feezu.liuli:timeselector:+'