diff --git a/app/src/main/java/com/example/citrusclient/views/HomeFragment.java b/app/src/main/java/com/example/citrusclient/views/HomeFragment.java index 7ce0a8c..11adefe 100644 --- a/app/src/main/java/com/example/citrusclient/views/HomeFragment.java +++ b/app/src/main/java/com/example/citrusclient/views/HomeFragment.java @@ -346,7 +346,9 @@ holder.todoButton.setOnClickListener(v -> { Activity activity = (Activity) context; - ((MainActivity) activity).showFragment(new CreateTodoFragment(todoData)); + ((MainActivity) activity).showFragment(new CreateTodoFragment(todoData, book)); + notifyDataSetChanged(); + }); holder.todoCheckBox.setOnCheckedChangeListener((buttonView, isChecked) -> { @@ -430,7 +432,6 @@ Schedule scheduleData = this.scheduleList.get(position); holder.scheduleButton.setText(scheduleData.getTitle()); // holder.scheduleButton.setText(scheduleData.getTitle() + extractionTime(scheduleData.getStartTime()) + " ~ " + extractionTime(scheduleData.getEndTime())); - System.out.println(scheduleData.getEndTime()); Book book = idBookHashMap.get(scheduleData.getBookId()); if(book != null) { red = Integer.parseInt(book.getColor().substring(1, 3), 16); @@ -459,6 +460,7 @@ // StringをLocalDateTimeに変換 LocalDateTime dateTime = LocalDateTime.parse(scheduleTime, formatter); + System.out.println(dateTime); // 年、月、日、時、分を抽出 int year = dateTime.getYear(); @@ -466,9 +468,9 @@ int day = dateTime.getDayOfMonth(); int hour = dateTime.getHour(); int minute = dateTime.getMinute(); - // 必要に応じて整数を組み合わせる(例: YYYYMMDDHHMM) - int result = year * 1000000 + month * 10000 + day * 100 + hour * 10 + minute; + int result = year * 100000 + month * 1000000 + day * 10000 + hour * 100 + minute; + System.out.println(result); return result; } catch (DateTimeParseException e) { @@ -481,6 +483,7 @@ int time = convertTimeInteger(scheduleTime); int result = time % 10000; return result; + } @Override