質問編集履歴
2
修正と加筆
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,437 +1,559 @@
|
|
1
1
|
今現在todoアプリを作っております。
|
2
2
|
|
3
|
-
ダイアログのImageView上にあるボタンをどちらか押すと、黒い線で囲まれている部分のデザインを切り替えたいと思い、その部分をフラグメント
|
3
|
+
ダイアログのImageView上にあるボタンをどちらか押すと、黒い線で囲まれている部分のデザインと処理を切り替えたいと思い、その部分をフラグメントにしましたが、分から無いことがあります。
|
4
4
|
|
5
5
|
|
6
6
|
|
7
7
|
##問題
|
8
8
|
|
9
|
-
すい
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
!![イメージ説明](863c5fe79e4de94301a565d0020d5a42.jpeg)
|
9
|
+
dialog上のフラグメント内にある真中のボタンを押すと、MaterialDateTimePickerのDatePickerDialogとTimePickerDialogが表示され、日付と時刻を選択した後に保存ボタンをタップすると、その時刻に通知するという処理を今作っているのですが、その処理の途中ででフラグメントからダイアログフラグメントに選択した日付を渡す必要があるのですが、どう渡せば良いのでしょうか?
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
!![イメージ説明](863c5fe79e4de94301a565d0020d5a42.jpeg)
|
14
|
+
|
15
|
+
|
14
16
|
|
15
17
|
|
16
18
|
|
17
19
|
ReminderDialog
|
18
20
|
|
21
|
+
```kotlin
|
22
|
+
|
23
|
+
class ReminderDialog : DialogFragment()
|
24
|
+
|
25
|
+
{
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
interface Listener{
|
30
|
+
|
31
|
+
fun reminderUp(date:Date, identifier:String)
|
32
|
+
|
33
|
+
}
|
34
|
+
|
35
|
+
private var listener: Listener? = null
|
36
|
+
|
37
|
+
private var dialogDateTime: String? = null
|
38
|
+
|
39
|
+
private var dateTime:Date? = null
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
//フラグメントがアクティビティから呼び出されたとき
|
46
|
+
|
47
|
+
override fun onAttach(context: Context) {
|
48
|
+
|
49
|
+
super.onAttach(context)
|
50
|
+
|
51
|
+
when(context){
|
52
|
+
|
53
|
+
is Listener -> listener = context
|
54
|
+
|
55
|
+
}
|
56
|
+
|
57
|
+
}
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
//ダイアログのインスタンス取得
|
72
|
+
|
73
|
+
val dialog:Dialog = Dialog(activity!!)
|
74
|
+
|
75
|
+
//タイトルバーなしのダイアログを表示
|
76
|
+
|
77
|
+
dialog.window?.requestFeature(Window.FEATURE_NO_TITLE)
|
78
|
+
|
79
|
+
//フルスクリーンでダイアログを表示
|
80
|
+
|
81
|
+
dialog.window?.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
|
82
|
+
|
83
|
+
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN)
|
84
|
+
|
85
|
+
//レイアウト指定
|
86
|
+
|
87
|
+
dialog.setContentView(R.layout.reminder_layout)
|
88
|
+
|
89
|
+
val now = Calendar.getInstance()
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
//時刻が夜の6時より前だったら太陽ボタンを消す
|
94
|
+
|
95
|
+
/*if(now.get(Calendar.HOUR) <= 18 && now.get(Calendar.HOUR) >= 6){
|
96
|
+
|
97
|
+
dialog.reminderMorningButton.visibility = View.GONE
|
98
|
+
|
99
|
+
}else{
|
100
|
+
|
101
|
+
dialog.reminderNightButton.visibility = View.GONE
|
102
|
+
|
103
|
+
}*/
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
//背景色を透明に
|
108
|
+
|
109
|
+
dialog.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
|
110
|
+
|
111
|
+
dialog.window?.setLayout(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
//保存ボタンを押したら通知を指定時間にセット
|
118
|
+
|
119
|
+
dialog.saveButton.setOnClickListener {
|
120
|
+
|
121
|
+
when{
|
122
|
+
|
123
|
+
dateTime != null ->{
|
124
|
+
|
125
|
+
val setDateTime = dateTime
|
126
|
+
|
127
|
+
if(setDateTime !=null)
|
128
|
+
|
129
|
+
listener?.reminderUp(setDateTime,"custum")
|
130
|
+
|
131
|
+
}
|
132
|
+
|
133
|
+
}
|
134
|
+
|
135
|
+
}
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
dialog.cancelButton.setOnClickListener {
|
140
|
+
|
141
|
+
dialog.cancel()
|
142
|
+
|
143
|
+
}
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
return dialog
|
150
|
+
|
151
|
+
}
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
156
|
+
|
157
|
+
super.onViewCreated(view, savedInstanceState)
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
/*val fragment = ReminderSelectFragment()
|
162
|
+
|
163
|
+
childFragmentManager.beginTransaction().add(R.id.reminderSelectFragment,fragment).commit()*/
|
164
|
+
|
165
|
+
}
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
//文字をDateに変換
|
170
|
+
|
171
|
+
private fun String.toDate(pattern: String = "yyyy/MM/dd HH:mm"): Date?{
|
172
|
+
|
173
|
+
return try {
|
174
|
+
|
175
|
+
SimpleDateFormat(pattern).parse(this)
|
176
|
+
|
177
|
+
}catch (e: IllegalArgumentException){
|
178
|
+
|
179
|
+
return null
|
180
|
+
|
181
|
+
}catch (e: ParseException){
|
182
|
+
|
183
|
+
return null
|
184
|
+
|
185
|
+
}
|
186
|
+
|
187
|
+
}
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
override fun onDetach() {
|
192
|
+
|
193
|
+
super.onDetach()
|
194
|
+
|
195
|
+
listener = null
|
196
|
+
|
197
|
+
}
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
//ダイアログを閉じる際フラグメントを削除
|
202
|
+
|
203
|
+
override fun onDestroy() {
|
204
|
+
|
205
|
+
super.onDestroy()
|
206
|
+
|
207
|
+
val fragment = reminderSelectFragment
|
208
|
+
|
209
|
+
val fragmentManager = activity!!.supportFragmentManager
|
210
|
+
|
211
|
+
fragmentManager.beginTransaction().remove(fragment).commit()
|
212
|
+
|
213
|
+
}
|
214
|
+
|
215
|
+
}
|
216
|
+
|
19
217
|
```
|
20
218
|
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
21
|
-
|
223
|
+
ReminderSelectFragment
|
224
|
+
|
22
|
-
|
225
|
+
```kotlin
|
226
|
+
|
227
|
+
/**
|
228
|
+
|
229
|
+
* A simple [Fragment] subclass.
|
230
|
+
|
231
|
+
*/
|
232
|
+
|
23
|
-
TimePickerDialog.OnTimeSetListener,
|
233
|
+
class ReminderSelectFragment : Fragment() , TimePickerDialog.OnTimeSetListener, DatePickerDialog.OnDateSetListener{
|
24
|
-
|
234
|
+
|
235
|
+
|
236
|
+
|
25
|
-
|
237
|
+
private var dialogDateTime: String? = null
|
238
|
+
|
26
|
-
|
239
|
+
private var dateTime:Date? = null
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
//時刻を選択したら文字列型の日付をDialogに渡す
|
244
|
+
|
245
|
+
override fun onTimeSet(view: TimePickerDialog?, hourOfDay: Int, minute: Int, second: Int){
|
246
|
+
|
247
|
+
val time = "%1$02d:%2$02d".format(hourOfDay, minute)
|
248
|
+
|
249
|
+
dialogDateTime += " ${time}"
|
250
|
+
|
27
|
-
|
251
|
+
}
|
252
|
+
|
28
|
-
|
253
|
+
//日付が選択された
|
254
|
+
|
255
|
+
override fun onDateSet(view: DatePickerDialog?, year: Int, monthOfYear: Int, dayOfMonth: Int) {
|
256
|
+
|
257
|
+
val c = Calendar.getInstance()
|
258
|
+
|
259
|
+
c.set(year, monthOfYear, dayOfMonth)
|
260
|
+
|
261
|
+
val date = DateFormat.format("yyyy/MM/dd", c).toString()
|
262
|
+
|
263
|
+
dialogDateTime = date
|
264
|
+
|
265
|
+
showTimePickerDialog(date)
|
266
|
+
|
267
|
+
}
|
268
|
+
|
269
|
+
|
270
|
+
|
29
|
-
//
|
271
|
+
//時刻選択ダイアログ
|
30
|
-
|
272
|
+
|
31
|
-
|
273
|
+
fun showTimePickerDialog(date:String) {
|
32
274
|
|
33
275
|
val now = Calendar.getInstance()
|
34
276
|
|
35
|
-
val dpd =
|
277
|
+
val dpd = TimePickerDialog.newInstance(
|
36
278
|
|
37
279
|
this,
|
38
280
|
|
39
|
-
now.get(Calendar.
|
281
|
+
now.get(Calendar.HOUR),
|
40
|
-
|
282
|
+
|
41
|
-
now.get(Calendar.M
|
283
|
+
now.get(Calendar.MINUTE)+1,
|
42
|
-
|
284
|
+
|
43
|
-
now.get(Calendar.
|
285
|
+
now.get(Calendar.SECOND),
|
286
|
+
|
287
|
+
false
|
44
288
|
|
45
289
|
)
|
46
290
|
|
47
|
-
d
|
291
|
+
var test = now.get(Calendar.YEAR).toString() + "/0" + ((now.get(Calendar.MONTH)+1).toString()) + "/" + now.get(Calendar.DAY_OF_MONTH).toString()
|
48
|
-
|
292
|
+
|
49
|
-
d
|
293
|
+
Log.d("HOUR","${now.get(Calendar.HOUR)}")
|
50
|
-
|
294
|
+
|
51
|
-
|
295
|
+
//指定された日付が現在日付ならば現在時刻の五分以降より前の時刻は選択させない
|
52
|
-
|
53
|
-
|
54
|
-
|
296
|
+
|
55
|
-
i
|
297
|
+
if(date == test) {
|
56
|
-
|
298
|
+
|
57
|
-
|
299
|
+
dpd.setMinTime(Timepoint(now.get(Calendar.HOUR),(now.get(Calendar.MINUTE)+1)))
|
58
|
-
|
59
|
-
}
|
60
|
-
|
61
|
-
private var listener: Listener? = null
|
62
|
-
|
63
|
-
private var dialogDateTime: String? = null
|
64
|
-
|
65
|
-
private var dateTime:Date? = null
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
//フラグメントがアクティビティから呼び出されたとき
|
72
|
-
|
73
|
-
override fun onAttach(context: Context) {
|
74
|
-
|
75
|
-
super.onAttach(context)
|
76
|
-
|
77
|
-
when(context){
|
78
|
-
|
79
|
-
is Listener -> listener = context
|
80
300
|
|
81
301
|
}
|
82
302
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
va
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
d
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
//
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
}
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
//時刻選択ダイアログ
|
136
|
-
|
137
|
-
fun showTimePickerDialog(date:String) {
|
138
|
-
|
139
|
-
val now = Calendar.getInstance()
|
140
|
-
|
141
|
-
val dpd = TimePickerDialog.newInstance(
|
142
|
-
|
143
|
-
this,
|
144
|
-
|
145
|
-
now.get(Calendar.HOUR),
|
146
|
-
|
147
|
-
now.get(Calendar.MINUTE)+1,
|
148
|
-
|
149
|
-
now.get(Calendar.SECOND),
|
150
|
-
|
151
|
-
false
|
152
|
-
|
153
|
-
)
|
154
|
-
|
155
|
-
var test = now.get(Calendar.YEAR).toString() + "/0" + ((now.get(Calendar.MONTH)+1).toString()) + "/" + now.get(Calendar.DAY_OF_MONTH).toString()
|
156
|
-
|
157
|
-
Log.d("HOUR","${now.get(Calendar.HOUR)}")
|
158
|
-
|
159
|
-
//指定された日付が現在日付ならば現在時刻の五分以降より前の時刻は選択させない
|
160
|
-
|
161
|
-
if(date == test) {
|
162
|
-
|
163
|
-
dpd.setMinTime(Timepoint(now.get(Calendar.HOUR),(now.get(Calendar.MINUTE)+1)))
|
303
|
+
|
304
|
+
|
305
|
+
dpd.show(fragmentManager!!, "aaaa")
|
306
|
+
|
307
|
+
}
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
override fun onCreateView(
|
312
|
+
|
313
|
+
inflater: LayoutInflater, container: ViewGroup?,
|
314
|
+
|
315
|
+
savedInstanceState: Bundle?
|
316
|
+
|
317
|
+
): View? {
|
318
|
+
|
319
|
+
// Inflate the layout for this fragment
|
320
|
+
|
321
|
+
var view = inflater.inflate(R.layout.fragment_reminder_select, container, false)
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
//日付選択ダイアログ呼び出し
|
326
|
+
|
327
|
+
view.reminderCustomButton.setOnClickListener {
|
328
|
+
|
329
|
+
val now = Calendar.getInstance()
|
330
|
+
|
331
|
+
val dpd = com.wdullaer.materialdatetimepicker.date.DatePickerDialog.newInstance(
|
332
|
+
|
333
|
+
this,
|
334
|
+
|
335
|
+
now.get(Calendar.YEAR), // Initial year selection
|
336
|
+
|
337
|
+
now.get(Calendar.MONTH), // Initial month selection
|
338
|
+
|
339
|
+
now.get(Calendar.DAY_OF_MONTH) // Inital day selection
|
340
|
+
|
341
|
+
)
|
342
|
+
|
343
|
+
dpd.minDate = now
|
344
|
+
|
345
|
+
dpd.show(fragmentManager!!, "Datepickerdialog")
|
164
346
|
|
165
347
|
}
|
166
348
|
|
167
|
-
|
168
|
-
|
169
|
-
|
349
|
+
return view
|
170
|
-
|
350
|
+
|
171
|
-
}
|
351
|
+
}
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
352
|
+
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
353
|
+
|
182
|
-
|
183
|
-
val dialog:Dialog = Dialog(activity!!)
|
184
|
-
|
185
|
-
//タイトルバーなしのダイアログを表示
|
186
|
-
|
187
|
-
dialog.window?.requestFeature(Window.FEATURE_NO_TITLE)
|
188
|
-
|
189
|
-
//フルスクリーンでダイアログを表示
|
190
|
-
|
191
|
-
dialog.window?.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
|
192
|
-
|
193
|
-
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN)
|
194
|
-
|
195
|
-
//レイアウト指定
|
196
|
-
|
197
|
-
dialog.setContentView(R.layout.reminder_layout)
|
198
|
-
|
199
|
-
val now = Calendar.getInstance()
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
//時刻が夜の6時より前だったら太陽ボタンを消す
|
204
|
-
|
205
|
-
/*if(now.get(Calendar.HOUR) <= 18 && now.get(Calendar.HOUR) >= 6){
|
206
|
-
|
207
|
-
dialog.reminderMorningButton.visibility = View.GONE
|
208
|
-
|
209
|
-
}else{
|
210
|
-
|
211
|
-
dialog.reminderNightButton.visibility = View.GONE
|
212
|
-
|
213
|
-
}*/
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
//背景色を透明に
|
218
|
-
|
219
|
-
dialog.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
|
220
|
-
|
221
|
-
dialog.window?.setLayout(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
//日付選択ダイアログ呼び出し
|
228
|
-
|
229
|
-
/*dialog.reminderCustomButton.setOnClickListener {
|
230
|
-
|
231
|
-
val dpd = com.wdullaer.materialdatetimepicker.date.DatePickerDialog.newInstance(
|
232
|
-
|
233
|
-
this,
|
234
|
-
|
235
|
-
now.get(Calendar.YEAR), // Initial year selection
|
236
|
-
|
237
|
-
now.get(Calendar.MONTH), // Initial month selection
|
238
|
-
|
239
|
-
now.get(Calendar.DAY_OF_MONTH) // Inital day selection
|
240
|
-
|
241
|
-
)
|
242
|
-
|
243
|
-
dpd.minDate = now
|
244
|
-
|
245
|
-
dpd.show(fragmentManager!!, "Datepickerdialog")
|
246
|
-
|
247
|
-
}*/
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
//保存ボタンを押したら通知を指定時間にセット
|
252
|
-
|
253
|
-
dialog.saveButton.setOnClickListener {
|
254
|
-
|
255
|
-
when{
|
256
|
-
|
257
|
-
dateTime != null ->{
|
258
|
-
|
259
|
-
val setDateTime = dateTime
|
260
|
-
|
261
|
-
if(setDateTime !=null)
|
262
|
-
|
263
|
-
listener?.reminderUp(setDateTime,"custum")
|
264
|
-
|
265
|
-
}
|
266
|
-
|
267
|
-
}
|
268
|
-
|
269
|
-
}
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
dialog.cancelButton.setOnClickListener {
|
274
|
-
|
275
|
-
dialog.cancel()
|
276
|
-
|
277
|
-
}
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
//明日の朝の九時に通知
|
282
|
-
|
283
|
-
/*dialog.reminderMorningButton.setOnClickListener{
|
284
|
-
|
285
|
-
val setMorning = now
|
286
|
-
|
287
|
-
setMorning.set(Calendar.HOUR_OF_DAY ,setMorning.get(Calendar.HOUR_OF_DAY)+1)
|
288
|
-
|
289
|
-
setMorning.set(Calendar.HOUR, 9)
|
290
|
-
|
291
|
-
setMorning.set(Calendar.MINUTE, 0)
|
292
|
-
|
293
|
-
val morning = setMorning.time
|
294
|
-
|
295
|
-
listener?.reminderUp(morning,"morning")
|
296
|
-
|
297
|
-
}*/
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
//今日の8時に通知
|
302
|
-
|
303
|
-
/*dialog.reminderNightButton.setOnClickListener {
|
304
|
-
|
305
|
-
val setNight = now
|
306
|
-
|
307
|
-
setNight.set(Calendar.HOUR, 20)
|
308
|
-
|
309
|
-
setNight.set(Calendar.MINUTE, 0)
|
310
|
-
|
311
|
-
val night = setNight.time
|
312
|
-
|
313
|
-
listener?.reminderUp(night, "night")
|
314
|
-
|
315
|
-
}*/
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
return dialog
|
320
|
-
|
321
|
-
}
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
326
|
-
|
327
|
-
super.onViewCreated(view, savedInstanceState)
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
val fragment = ReminderSelectFragment()
|
332
|
-
|
333
|
-
childFragmentManager.beginTransaction().add(R.id.reminderSelectFragment,fragment).commit()
|
334
|
-
|
335
|
-
}
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
//文字をDateに変換
|
340
|
-
|
341
|
-
private fun String.toDate(pattern: String = "yyyy/MM/dd HH:mm"): Date?{
|
342
|
-
|
343
|
-
return try {
|
344
|
-
|
345
|
-
SimpleDateFormat(pattern).parse(this)
|
346
|
-
|
347
|
-
}catch (e: IllegalArgumentException){
|
348
|
-
|
349
|
-
return null
|
350
|
-
|
351
|
-
}catch (e: ParseException){
|
352
|
-
|
353
|
-
return null
|
354
|
-
|
355
|
-
}
|
356
|
-
|
357
|
-
}
|
358
354
|
|
359
355
|
}
|
360
356
|
|
361
|
-
|
362
|
-
|
363
357
|
```
|
364
358
|
|
365
359
|
|
366
360
|
|
367
|
-
|
368
|
-
|
369
|
-
```
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
in
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
o
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
361
|
+
reminder_layout.xml
|
362
|
+
|
363
|
+
```Xml
|
364
|
+
|
365
|
+
<?xml version="1.0" encoding="utf-8"?>
|
366
|
+
|
367
|
+
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
368
|
+
|
369
|
+
xmlns:app="http://schemas.android.com/apk/res-auto"
|
370
|
+
|
371
|
+
xmlns:tools="http://schemas.android.com/tools"
|
372
|
+
|
373
|
+
android:id="@+id/linearLayout"
|
374
|
+
|
375
|
+
android:layout_width="match_parent"
|
376
|
+
|
377
|
+
android:layout_height="wrap_content"
|
378
|
+
|
379
|
+
android:layout_margin="16dp"
|
380
|
+
|
381
|
+
android:background="@drawable/shape_rounded_corners_5dp">
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
<fragment
|
386
|
+
|
387
|
+
android:id="@+id/reminderSelectFragment"
|
388
|
+
|
389
|
+
android:name="com.example.mytask.ReminderSelectFragment"
|
390
|
+
|
391
|
+
android:layout_width="0dp"
|
392
|
+
|
393
|
+
android:layout_height="wrap_content"
|
394
|
+
|
395
|
+
android:layout_marginTop="24dp"
|
396
|
+
|
397
|
+
app:layout_constraintEnd_toEndOf="parent"
|
398
|
+
|
399
|
+
app:layout_constraintStart_toStartOf="parent"
|
400
|
+
|
401
|
+
app:layout_constraintTop_toBottomOf="@+id/radioGroup2"
|
402
|
+
|
403
|
+
tools:layout="@layout/fragment_reminder_select" />
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
<RadioGroup
|
408
|
+
|
409
|
+
android:id="@+id/radioGroup2"
|
410
|
+
|
411
|
+
android:layout_width="0dp"
|
412
|
+
|
413
|
+
android:layout_height="wrap_content"
|
414
|
+
|
415
|
+
android:layout_marginStart="24dp"
|
416
|
+
|
417
|
+
android:layout_marginTop="24dp"
|
418
|
+
|
419
|
+
android:layout_marginEnd="24dp"
|
420
|
+
|
421
|
+
android:orientation="horizontal"
|
422
|
+
|
423
|
+
app:layout_constraintEnd_toEndOf="parent"
|
424
|
+
|
425
|
+
app:layout_constraintStart_toStartOf="parent"
|
426
|
+
|
427
|
+
app:layout_constraintTop_toBottomOf="@+id/textView">
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
<RadioButton
|
432
|
+
|
433
|
+
android:id="@+id/reminderOneTimeRadio"
|
434
|
+
|
435
|
+
android:layout_width="156dp"
|
436
|
+
|
437
|
+
android:layout_height="wrap_content"
|
438
|
+
|
439
|
+
android:background="@drawable/image_view_maru"
|
440
|
+
|
441
|
+
android:text="1回"
|
442
|
+
|
443
|
+
android:textAlignment="center"
|
444
|
+
|
445
|
+
android:textSize="20sp" />
|
446
|
+
|
447
|
+
|
448
|
+
|
449
|
+
<RadioButton
|
450
|
+
|
451
|
+
android:id="@+id/reminderRepeatRadio"
|
452
|
+
|
453
|
+
android:layout_width="match_parent"
|
454
|
+
|
455
|
+
android:layout_height="wrap_content"
|
456
|
+
|
457
|
+
android:background="@drawable/image_view_maru"
|
458
|
+
|
459
|
+
android:text="リピート"
|
460
|
+
|
461
|
+
android:textAlignment="center"
|
462
|
+
|
463
|
+
android:textSize="20sp" />
|
464
|
+
|
465
|
+
</RadioGroup>
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
<TextView
|
470
|
+
|
471
|
+
android:id="@+id/textView"
|
472
|
+
|
473
|
+
android:layout_width="0dp"
|
474
|
+
|
475
|
+
android:layout_height="wrap_content"
|
476
|
+
|
477
|
+
android:background="@drawable/text_view_rounded"
|
478
|
+
|
479
|
+
android:text="リマインダー追加"
|
480
|
+
|
481
|
+
android:textColor="#000000"
|
482
|
+
|
483
|
+
android:textSize="35sp"
|
484
|
+
|
485
|
+
android:textStyle="bold"
|
486
|
+
|
487
|
+
app:layout_constraintEnd_toEndOf="parent"
|
488
|
+
|
489
|
+
app:layout_constraintStart_toStartOf="parent"
|
490
|
+
|
491
|
+
app:layout_constraintTop_toTopOf="parent" />
|
492
|
+
|
493
|
+
|
494
|
+
|
495
|
+
<LinearLayout
|
496
|
+
|
497
|
+
android:id="@+id/linearLayout2"
|
498
|
+
|
499
|
+
android:layout_width="match_parent"
|
500
|
+
|
501
|
+
android:layout_height="0dp"
|
502
|
+
|
503
|
+
android:layout_marginTop="24dp"
|
504
|
+
|
505
|
+
android:orientation="horizontal"
|
506
|
+
|
507
|
+
app:layout_constraintEnd_toEndOf="parent"
|
508
|
+
|
509
|
+
app:layout_constraintStart_toStartOf="parent"
|
510
|
+
|
511
|
+
app:layout_constraintTop_toBottomOf="@+id/reminderSelectFragment">
|
512
|
+
|
513
|
+
|
514
|
+
|
515
|
+
<Button
|
516
|
+
|
517
|
+
android:id="@+id/cancelButton"
|
518
|
+
|
519
|
+
android:layout_width="match_parent"
|
520
|
+
|
521
|
+
android:layout_height="match_parent"
|
522
|
+
|
523
|
+
android:layout_weight="1"
|
524
|
+
|
525
|
+
android:background="@drawable/botton_border"
|
526
|
+
|
527
|
+
android:text="キャンセル"
|
528
|
+
|
529
|
+
android:textSize="25sp"
|
530
|
+
|
531
|
+
app:layout_constraintStart_toStartOf="parent" />
|
532
|
+
|
533
|
+
|
534
|
+
|
535
|
+
<Button
|
536
|
+
|
537
|
+
android:id="@+id/saveButton"
|
538
|
+
|
539
|
+
android:layout_width="match_parent"
|
540
|
+
|
541
|
+
android:layout_height="match_parent"
|
542
|
+
|
543
|
+
android:layout_weight="1"
|
544
|
+
|
545
|
+
android:background="@drawable/botton_border"
|
546
|
+
|
547
|
+
android:text="保存"
|
548
|
+
|
549
|
+
android:textSize="25sp" />
|
550
|
+
|
551
|
+
</LinearLayout>
|
552
|
+
|
553
|
+
|
554
|
+
|
555
|
+
</androidx.constraintlayout.widget.ConstraintLayout>
|
556
|
+
|
557
|
+
|
436
558
|
|
437
559
|
```
|
1
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
##問題
|
8
8
|
|
9
|
-
|
9
|
+
すいません。いま誤字修正中です
|
10
10
|
|
11
11
|
|
12
12
|
|