datePicker #30
|
@ -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);
|
||||
|
|
|
@ -21,17 +21,16 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/toMain"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="90dp"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_gravity="left"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:src="@drawable/back_button"/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:text="@string/setUp"
|
||||
android:textSize="30sp"/>
|
||||
|
||||
|
@ -92,7 +91,7 @@
|
|||
<TextView
|
||||
android:layout_width="90sp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/startTime"
|
||||
android:text="日付設定"
|
||||
android:gravity="center"/>
|
||||
|
||||
<!-- <TextView-->
|
||||
|
@ -107,7 +106,7 @@
|
|||
<!-- tools:ignore="HardcodedText,LabelFor"/>-->
|
||||
|
||||
<Button
|
||||
android:id="@+id/startFirstDay"
|
||||
android:id="@+id/setFirstDayButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="1日目"
|
||||
|
@ -116,7 +115,7 @@
|
|||
tools:ignore="DuplicateIds" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/startSecondDay"
|
||||
android:id="@+id/setSecondDayButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="2日目"
|
||||
|
@ -125,7 +124,7 @@
|
|||
tools:ignore="DuplicateIds" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/startThirdDay"
|
||||
android:id="@+id/setThirdDayButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="3日目"
|
||||
|
@ -135,6 +134,41 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:layout_width="90sp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/startTime"
|
||||
android:gravity="center"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/startTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="未設定"
|
||||
android:textSize="20sp"
|
||||
android:textAlignment="center"
|
||||
android:autofillHints=""
|
||||
android:inputType=""
|
||||
tools:ignore="LabelFor"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/startTimeSetButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/timeSet"
|
||||
android:layout_marginStart="65dp"
|
||||
android:layout_marginEnd="65dp"
|
||||
tools:ignore="DuplicateIds" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -148,51 +182,26 @@
|
|||
android:text="@string/endTime"
|
||||
android:gravity="center"/>
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/endTime"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:text=" "-->
|
||||
<!-- android:textSize="20sp"-->
|
||||
<!-- android:textAlignment="center"-->
|
||||
<!-- android:autofillHints=""-->
|
||||
<!-- android:inputType=""-->
|
||||
<!-- tools:ignore="LabelFor"/>-->
|
||||
|
||||
<!-- <Button-->
|
||||
<!-- android:id="@+id/endTimeSetButton"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:text="@string/timeSet"-->
|
||||
<!-- android:layout_marginStart="65dp"-->
|
||||
<!-- android:layout_marginEnd="65dp"-->
|
||||
<!-- tools:ignore="DuplicateIds" />-->
|
||||
<Button
|
||||
android:id="@+id/endFirstDay"
|
||||
<TextView
|
||||
android:id="@+id/endTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="1日目"
|
||||
android:layout_marginStart="7sp"
|
||||
android:layout_marginEnd="7sp"
|
||||
tools:ignore="DuplicateIds" />
|
||||
android:hint="未設定"
|
||||
android:textSize="20sp"
|
||||
android:textAlignment="center"
|
||||
android:autofillHints=""
|
||||
android:inputType=""
|
||||
tools:ignore="LabelFor"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/endSecondDay"
|
||||
android:id="@+id/endTimeSetButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="2日目"
|
||||
android:layout_marginStart="7sp"
|
||||
android:layout_marginEnd="7sp"
|
||||
android:text="@string/timeSet"
|
||||
android:layout_marginStart="65dp"
|
||||
android:layout_marginEnd="65dp"
|
||||
tools:ignore="DuplicateIds" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/endThirdDay"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="3日目"
|
||||
android:layout_marginStart="7sp"
|
||||
android:layout_marginEnd="7sp"
|
||||
tools:ignore="DuplicateIds" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
|
Loading…
Reference in New Issue
Block a user