/**
*设置开始时间
* 半年时间
*
* */
public void rw_caseTime_setTime1_Event(View v){
Calendar cale1 = Calendar.getInstance();
int year = cale1.get(Calendar.YEAR); //获取年份
int month = cale1.get(Calendar.MONTH); //获取月份
int day = cale1.get(Calendar.DATE); //获取日期
month-=6;
cale1.set(Calendar.YEAR,year);
cale1.set(Calendar.MONTH, month);
cale1.set(Calendar.DAY_OF_MONTH,day);
new DatePickerDialog(RwxfActivity.this,new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int monthOfYear,
int dayOfMonth) {
//这里获取到的月份+1
String month=DataTool.setSqliteMonthFormat(monthOfYear+1);
String day=DataTool.setSqliteDayFormat(dayOfMonth);
// String result=year+"-"+(monthOfYear+1)+"-"+dayOfMonth;
String result=year+"-"+month+"-"+day;
DataTool.startTime_rw=""+result;
activity_time1.setText(DataTool.startTime_rw);
}
} ,
cale1.get(Calendar.YEAR),
cale1.get(Calendar.MONTH),
cale1.get(Calendar.DAY_OF_MONTH)
).show();
}
/**
* 任务列表 -设置 结束时间
*
* */
public void rw_caseTime_setTime2_Event(View v){
Calendar cale1 = Calendar.getInstance();
new DatePickerDialog(RwxfActivity.this,new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int monthOfYear,
int dayOfMonth) {
//这里获取到的月份需要加上1哦~
String month=DataTool.setSqliteMonthFormat(monthOfYear+1);
String day=DataTool.setSqliteDayFormat(dayOfMonth);
String result=year+"-"+month+"-"+day;
DataTool.endTime_rw=""+result;
activity_time2.setText(DataTool.endTime_rw);
}
} ,
cale1.get(Calendar.YEAR),
cale1.get(Calendar.MONTH),
cale1.get(Calendar.DAY_OF_MONTH)
).show();
}
*设置开始时间
* 半年时间
*
* */
public void rw_caseTime_setTime1_Event(View v){
Calendar cale1 = Calendar.getInstance();
int year = cale1.get(Calendar.YEAR); //获取年份
int month = cale1.get(Calendar.MONTH); //获取月份
int day = cale1.get(Calendar.DATE); //获取日期
month-=6;
cale1.set(Calendar.YEAR,year);
cale1.set(Calendar.MONTH, month);
cale1.set(Calendar.DAY_OF_MONTH,day);
new DatePickerDialog(RwxfActivity.this,new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int monthOfYear,
int dayOfMonth) {
//这里获取到的月份+1
String month=DataTool.setSqliteMonthFormat(monthOfYear+1);
String day=DataTool.setSqliteDayFormat(dayOfMonth);
// String result=year+"-"+(monthOfYear+1)+"-"+dayOfMonth;
String result=year+"-"+month+"-"+day;
DataTool.startTime_rw=""+result;
activity_time1.setText(DataTool.startTime_rw);
}
} ,
cale1.get(Calendar.YEAR),
cale1.get(Calendar.MONTH),
cale1.get(Calendar.DAY_OF_MONTH)
).show();
}
/**
* 任务列表 -设置 结束时间
*
* */
public void rw_caseTime_setTime2_Event(View v){
Calendar cale1 = Calendar.getInstance();
new DatePickerDialog(RwxfActivity.this,new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int monthOfYear,
int dayOfMonth) {
//这里获取到的月份需要加上1哦~
String month=DataTool.setSqliteMonthFormat(monthOfYear+1);
String day=DataTool.setSqliteDayFormat(dayOfMonth);
String result=year+"-"+month+"-"+day;
DataTool.endTime_rw=""+result;
activity_time2.setText(DataTool.endTime_rw);
}
} ,
cale1.get(Calendar.YEAR),
cale1.get(Calendar.MONTH),
cale1.get(Calendar.DAY_OF_MONTH)
).show();
}