From a08b9c33ae7f3f4e9d38919897ce3acce3f3e7b1 Mon Sep 17 00:00:00 2001
From: Ekamo-11 <148836598+Ekamo-11@users.noreply.github.com>
Date: Fri, 28 Jun 2024 16:20:56 +0900
Subject: [PATCH] =?UTF-8?q?=E4=BB=95=E6=A7=98=E3=81=AB=E4=BF=AE=E6=AD=A3?=
=?UTF-8?q?=E3=81=8C=E3=81=82=E3=81=A3=E3=81=9F=E3=81=AE=E3=81=A7=E3=80=81?=
=?UTF-8?q?=E3=83=AC=E3=82=A4=E3=82=A2=E3=82=A6=E3=83=88=E3=82=92=E4=BF=AE?=
=?UTF-8?q?=E6=AD=A3=E3=81=97=E3=80=81=E5=A4=89=E6=95=B0=E3=82=82=E5=A4=89?=
=?UTF-8?q?=E6=9B=B4=E3=81=97=E3=81=BE=E3=81=97=E3=81=9F=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/example/oplogy/SetUpActivity.java | 38 ++++---
app/src/main/res/layout/activity_set_up.xml | 99 ++++++++++---------
2 files changed, 71 insertions(+), 66 deletions(-)
diff --git a/app/src/main/java/com/example/oplogy/SetUpActivity.java b/app/src/main/java/com/example/oplogy/SetUpActivity.java
index 057bebd..e07c933 100644
--- a/app/src/main/java/com/example/oplogy/SetUpActivity.java
+++ b/app/src/main/java/com/example/oplogy/SetUpActivity.java
@@ -38,6 +38,8 @@ public class SetUpActivity extends FragmentActivity
int totalStudent;
private TextView setTeacherName;
private TextView setStartPoint;
+ private TextView setStartTime;
+ private TextView setEndTime;
private TextView setStartBreakTime;
private TextView setEndBreakTime;
private TextView setTotalStudent;
@@ -46,19 +48,11 @@ public class SetUpActivity extends FragmentActivity
String stringHourOfDay;
String stringMinute;
- Button startFirstDay;
- Button startSecondDay;
- Button startThirdDay;
- Button endFirstDay;
- Button endSecondDay;
- Button endThirdDay;
-
-
-
-
-
- Button startTimeSetButton;
- Button endTimeSetButton;
+ Button firstDay;
+ Button secondDay;
+ Button thirdDay;
+ Button setStartTimeButton;
+ Button setEndTimeButton;
@@ -73,13 +67,14 @@ public class SetUpActivity extends FragmentActivity
setTeacherName = findViewById(R.id.teacherName); //先生の名前
setStartPoint = findViewById(R.id.startPoint); //開始地点
- startFirstDay = findViewById(R.id.startFirstDay); //1日目の開始時刻を設定するボタン
- startSecondDay = findViewById(R.id.startSecondDay); //2日目の開始時刻
- startThirdDay = findViewById(R.id.startThirdDay); //3日目の開始時刻
+ firstDay = findViewById(R.id.setFirstDayButton); //1日目の日付
+ secondDay = findViewById(R.id.setSecondDayButton); //2日目の日付
+ thirdDay = findViewById(R.id.setThirdDayButton); //3日目の日付
- endFirstDay = findViewById(R.id.endFirstDay); //1日目の終了時刻を設定するボタン
- endSecondDay = findViewById(R.id.endSecondDay); //2日目の終了時刻
- endThirdDay = findViewById(R.id.endThirdDay); //3日目の終了時刻
+ setStartTimeButton = findViewById(R.id.startTimeSetButton); //開始時刻を設定するボタン
+ setStartTime = findViewById(R.id.startTime); //開始時刻を出力するTextView
+ setEndTimeButton = findViewById(R.id.endTimeSetButton); //終了時刻を設定するボタン
+ setEndTime = findViewById(R.id.endTime); //終了時刻を出力するTextView
RadioButton setTenMinute = findViewById(R.id.tenMinute); //訪問間隔(10分)
RadioButton setFifteenMinute = findViewById(R.id.fifteenMinute); //訪問間隔(15分)
@@ -170,12 +165,12 @@ public class SetUpActivity extends FragmentActivity
});
- startTimeSetButton.setOnClickListener(v -> {
+ setStartTimeButton.setOnClickListener(v -> {
isStartTimeSelected = 1; //ボタンの判別
showTimePickerDialog(); //TimePeckerの表示
});
- endTimeSetButton.setOnClickListener(v -> {
+ setEndTimeButton.setOnClickListener(v -> {
isStartTimeSelected = 2;
showTimePickerDialog();
});
@@ -221,6 +216,7 @@ public class SetUpActivity extends FragmentActivity
stringMinute = String.format("%02d", minute); //分を取得
startTime = stringHourOfDay + stringMinute; //時と分を結合し四桁の文字列に
+
} else if (isStartTimeSelected == 2) {
stringHourOfDay = String.format("%02d", hourOfDay);
stringMinute = String.format("%02d", minute);
diff --git a/app/src/main/res/layout/activity_set_up.xml b/app/src/main/res/layout/activity_set_up.xml
index 0a6e99a..84bc0c8 100644
--- a/app/src/main/res/layout/activity_set_up.xml
+++ b/app/src/main/res/layout/activity_set_up.xml
@@ -21,17 +21,16 @@
@@ -92,7 +91,7 @@
@@ -107,7 +106,7 @@