我有一个类似下面的csv:
public void UpdateScheduleInfo(String metaFile){
System.out.println("Enterring UpdateScheduleInfo method::");
List<CreateScheduleDao> ScheduleList = new ArrayList<CreateScheduleDao>();
CSVFormat csvFileFormat = CSVFormat.EXCEL.withHeader();
FileReader file = null;
CSVParser csvParser = null;
try {
file= new FileReader(metaFile);
csvParser = new CSVParser(file,csvFileFormat);
List<CSVRecord> records = csvParser.getRecords();
/
for (int i = 0; i < records.size(); i++) {
if (records.get(i).get(7).equals("scheduled")){
System.out.println("Changing the status");
我想解析这个csv读取它并且如果调度了status fileds值,则需要将其更新为完成。
我能够解析它:
public static void hideSoftInput(Activity activity) {
try {
if (activity == null || activity.isFinishing()) return;
Window window = activity.getWindow();
if (window == null) return;
View view = window.getCurrentFocus();
//give decorView a chance
if (view == null) view = window.getDecorView();
if (view == null) return;
InputMethodManager imm = (InputMethodManager) activity.getApplicationContext().getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm == null || !imm.isActive()) return;
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
} catch (Throwable e) {
e.printStackTrace();
}
}
请建议如何更新