代码拉取完成,页面将自动刷新
#YrMTimeDialog 就前两天的事情由于项目上需要用到时间选择器,系统的又无法满足,无奈之下自定义了一个,由于时间紧急未做优化。 版本v1.0.0 支持日期选择 支持月份选择 支持年份选择 未添加时间星期显示,预计下版本添加
版本v1.1.0 新增时间星期显示
依赖 compile 'com.android.support:appcompat-v7:25.0.0' compile 'com.android.support:recyclerview-v7:25.0.0'
使用方法 实现接口: implements MTimeOnClickListener 实例化: MTimeDialog mTimeDialog = new MTimeDialog(this); 设置监听: mTimeDialog.setMTimeOnClickListener(this);
日期选择: mTimeDialog.showDayTime(); 月份选择: mTimeDialog.showMonthTime(); 年份选择: mTimeDialog.showYearTime();
@Override
public void getYear(int year) {//year对话框点击确定时调用
tv_time.setText(year + "年");
}
@Override
public void getYear_Month(int year, int month) {//month对话框点击确定时调用
tv_time.setText(year + "年" + month + "月");
}
@Override
public void getYear_Month_Day(int year, int month, int day) {//日期对话框点击确定时调用
tv_time.setText(year + "年" + month + "月" + day + "日");
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。