質問編集履歴

4

勘違いしてしまいました。エラーは表示されておりませんでした。

2021/07/12 04:50

投稿

aqua2021
aqua2021

スコア0

test CHANGED
File without changes
test CHANGED
@@ -12,544 +12,534 @@
12
12
 
13
13
 
14
14
 
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+ ```MainActivity
24
+
25
+ package com.example.mytodoapplication
26
+
27
+
28
+
29
+ import android.content.Intent
30
+
31
+ import android.os.Bundle
32
+
33
+ import android.util.Log
34
+
35
+ import android.view.View
36
+
37
+ import android.widget.AdapterView
38
+
39
+ import android.widget.ArrayAdapter
40
+
41
+ import android.widget.ListView
42
+
43
+ import androidx.appcompat.app.AlertDialog
44
+
45
+ import androidx.appcompat.app.AppCompatActivity
46
+
47
+ import com.example.mytodoapplication.databinding.ActivityMainBinding
48
+
15
- ### 発生している問題・エラーメッセージ
49
+ import io.realm.Realm
50
+
51
+ import io.realm.RealmResults
52
+
53
+ import java.util.*
54
+
55
+
56
+
57
+ class MainActivity : AppCompatActivity() ,AdapterView.OnItemClickListener,AdapterView.OnItemLongClickListener {
58
+
59
+ private lateinit var binding: ActivityMainBinding
60
+
61
+
62
+
63
+ lateinit var realm: Realm
64
+
65
+ lateinit var result: RealmResults<TaskDB>
66
+
67
+ lateinit var task_list: ArrayList<String>
68
+
69
+ lateinit var adapter: ArrayAdapter<String>
70
+
71
+
72
+
73
+ override fun onCreate(savedInstanceState: Bundle?) {
74
+
75
+ super.onCreate(savedInstanceState)
76
+
77
+ binding = ActivityMainBinding.inflate(layoutInflater)
78
+
79
+ setContentView(binding.root)
80
+
81
+
82
+
83
+ val listView: ListView = findViewById(R.id.listView)
84
+
85
+
86
+
87
+ binding.buttonAddNewWord.setOnClickListener {
88
+
89
+ val intent = Intent(this@MainActivity, EditActivity::class.java)
90
+
91
+
92
+
93
+ intent.putExtra(getString(R.string.intent_key_status), getString(R.string.status_add))
94
+
95
+ startActivity(intent)
96
+
97
+
98
+
99
+ }
100
+
101
+
102
+
103
+ binding.listView.setOnItemClickListener(this)
104
+
105
+ binding.listView.setOnItemLongClickListener(this)
106
+
107
+ }
108
+
109
+
110
+
111
+
112
+
113
+ override fun onResume() {
114
+
115
+ super.onResume()
116
+
117
+
118
+
119
+ val listView: ListView = findViewById(R.id.listView)
120
+
121
+
122
+
123
+ realm = Realm.getDefaultInstance()
124
+
125
+
126
+
127
+ result = realm.where(TaskDB::class.java).findAll().sort("strTime")
128
+
129
+
130
+
131
+ task_list = ArrayList<String>()
132
+
133
+
134
+
135
+ val length = result.size
136
+
137
+ for (i in 0..length - 1) {
138
+
139
+ if (result[i]!!.finishFrag) {
140
+
141
+ task_list.add(result[i]!!.strTime + ":" + result[i]!!.strTask + "✔️")
142
+
143
+ } else {
144
+
145
+ task_list.add(result[i]!!.strTime + ":" + result[i]!!.strTask)
146
+
147
+ }
148
+
149
+ }
150
+
151
+
152
+
153
+ var adapter = ArrayAdapter(this, android.R.layout.simple_list_item_1, task_list)
154
+
155
+ listView.adapter = adapter
156
+
157
+
158
+
159
+ }
160
+
161
+
162
+
163
+ override fun onPause(){
164
+
165
+ super.onPause()
166
+
167
+
168
+
169
+ realm.close()
170
+
171
+ }
172
+
173
+
174
+
175
+ override fun onItemClick(parent:AdapterView<*>?,view:View?,position:Int,id:Long){
176
+
177
+
178
+
179
+ val selectDB=result[position]
180
+
181
+ val strSelectTime=result[position]!!.strTime
182
+
183
+ val strSelectTask=result[position]!!.strTask
184
+
185
+ val strSelectFrag=result[position]!!.finishFrag
186
+
187
+ val intent=Intent(this@MainActivity,EditActivity::class.java).apply{
188
+
189
+
190
+
191
+ putExtra(getString(R.string.intent_key_time),strSelectTime)
192
+
193
+ putExtra(getString(R.string.intent_key_task),strSelectTask)
194
+
195
+ putExtra(getString(R.string.intent_key_frag),strSelectFrag)
196
+
197
+ putExtra(getString(R.string.intent_key_position),position)
198
+
199
+ putExtra(getString(R.string.intent_key_status),getString(R.string.status_change))
200
+
201
+ startActivity(intent)
202
+
203
+
204
+
205
+ }
206
+
207
+
208
+
209
+ }
210
+
211
+
212
+
213
+ override fun onItemLongClick(parent:AdapterView<*>?,view:View?,position:Int,id:Long):Boolean{
214
+
215
+
216
+
217
+ val listView: ListView =findViewById(R.id.listView)
218
+
219
+
220
+
221
+ val selectDB = result[position]!!
222
+
223
+ val dialog = AlertDialog.Builder(this@MainActivity).apply {
224
+
225
+ setTitle(selectDB.strTask + "の削除")
226
+
227
+ setMessage("削除しても良いですか?")
228
+
229
+ setPositiveButton("yes") { dialog, which->
230
+
231
+
232
+
233
+
234
+
235
+ realm.beginTransaction()
236
+
237
+ selectDB.deleteFromRealm()
238
+
239
+ realm.commitTransaction()
240
+
241
+ task_list.removeAt(position)
242
+
243
+ listView.adapter = adapter
244
+
245
+
246
+
247
+ }
248
+
249
+ setNegativeButton("no") { dialog, which->
250
+
251
+ }
252
+
253
+ show()
254
+
255
+ }
256
+
257
+
258
+
259
+ return true
260
+
261
+ }
262
+
263
+ }
16
264
 
17
265
  ```
18
266
 
267
+
268
+
269
+
270
+
271
+
272
+
273
+
274
+
275
+
276
+
277
+ ```EditActivity
278
+
279
+ package com.example.mytodoapplication
280
+
281
+
282
+
283
+ //import kotlinx.android.synthetic.main.activity_edit.*
284
+
285
+ import android.os.Bundle
286
+
287
+ import android.widget.CheckBox
288
+
289
+ import android.widget.EditText
290
+
291
+ import android.widget.TextView
292
+
293
+ import android.widget.Toast
294
+
295
+ import androidx.appcompat.app.AppCompatActivity
296
+
297
+ import com.example.mytodoapplication.databinding.ActivityEditBinding
298
+
299
+ import io.realm.Realm
300
+
301
+ //import kotlinx.android.synthetic.main.activity_edit.*
302
+
303
+ import java.text.SimpleDateFormat
304
+
305
+ import java.util.*
306
+
307
+
308
+
309
+ class EditActivity : AppCompatActivity() {
310
+
311
+
312
+
313
+ lateinit var realm: Realm
314
+
315
+ var strTime: String = ""
316
+
317
+ var strTask: String = ""
318
+
319
+ var intposition: Int = 0
320
+
321
+ var boolMemorize: Boolean = false
322
+
323
+
324
+
325
+ private lateinit var binding:ActivityEditBinding
326
+
327
+
328
+
329
+ override fun onCreate(savedInstanceState: Bundle?) {
330
+
331
+ super.onCreate(savedInstanceState)
332
+
333
+ binding=ActivityEditBinding.inflate(layoutInflater)
334
+
335
+ setContentView(binding.root)
336
+
337
+
338
+
339
+ var editTextTime:EditText=findViewById(R.id.editTextTime)
340
+
341
+ var editTextTask:EditText=findViewById(R.id.editTextTask)
342
+
343
+ var textViewStatus: TextView =findViewById(R.id.textViewStatus)
344
+
345
+ var checkBox: CheckBox =findViewById(R.id.checkBox)
346
+
347
+
348
+
349
+
350
+
351
+ val df = SimpleDateFormat("MM/dd HH:mm")
352
+
353
+ val date = Date()
354
+
355
+ editTextTime.setText(df.format(date))
356
+
357
+
358
+
359
+ val bundle = intent.extras
360
+
361
+ val strStatus = bundle!!.getString(getString(R.string.intent_key_status))
362
+
363
+ textViewStatus.text = strStatus
364
+
365
+
366
+
367
+ if (strStatus == getString(R.string.status_change)) {
368
+
369
+ strTime = bundle.getString (getString(R.string.intent_key_time))!!
370
+
371
+ strTask = bundle.getString(getString(R.string.intent_key_task))!!
372
+
373
+ boolMemorize = bundle.getBoolean(getString(R.string.intent_key_frag))
374
+
375
+
376
+
377
+ editTextTime.setText(strTime)
378
+
379
+ editTextTask.setText(strTask)
380
+
381
+ checkBox.isChecked = boolMemorize
382
+
383
+
384
+
385
+ intposition = bundle.getInt(getString(R.string.intent_key_position))
386
+
387
+ }
388
+
389
+
390
+
391
+ binding.checkBox.setOnClickListener {
392
+
393
+ boolMemorize = checkBox.isChecked
394
+
395
+ }
396
+
397
+
398
+
399
+ binding.buttonRegister.setOnClickListener {
400
+
401
+
402
+
403
+
404
+
405
+
406
+
407
+ if (strStatus == getString(R.string.status_add)){
408
+
409
+
410
+
411
+ addNewTask()
412
+
413
+ } else {
414
+
415
+ changeTask()
416
+
417
+ }
418
+
419
+ }
420
+
421
+
422
+
423
+ binding.buttonBack.setOnClickListener {
424
+
425
+
426
+
427
+ finish()
428
+
429
+ }
430
+
431
+ }
432
+
433
+
434
+
435
+ override fun onResume() {
436
+
437
+ super.onResume()
438
+
439
+
440
+
441
+ realm= Realm.getDefaultInstance()
442
+
443
+ }
444
+
445
+
446
+
447
+ override fun onPause() {
448
+
449
+ super.onPause()
450
+
451
+
452
+
453
+ realm.close()
454
+
455
+ }
456
+
457
+
458
+
459
+ private fun changeTask(){
460
+
461
+ val result=realm.where(TaskDB::class.java).findAll().sort("strTime")
462
+
463
+ val selectDB=result[intposition]!!
464
+
465
+ realm.beginTransaction()
466
+
467
+
468
+
469
+ var editTextTime:EditText=findViewById(R.id.editTextTime)
470
+
471
+ var editTextTask:EditText=findViewById(R.id.editTextTask)
472
+
473
+ var textViewStatus: TextView =findViewById(R.id.textViewStatus)
474
+
475
+ var checkBox: CheckBox =findViewById(R.id.checkBox)
476
+
477
+
478
+
479
+ selectDB.strTime=editTextTime.text.toString()
480
+
481
+ selectDB.strTask=editTextTask.text.toString()
482
+
483
+ selectDB.finishFrag=boolMemorize
484
+
485
+ realm.commitTransaction()
486
+
487
+
488
+
489
+ editTextTime.setText("")
490
+
491
+ editTextTask.setText("")
492
+
493
+
494
+
495
+ Toast.makeText(this@EditActivity,"修正完了",Toast.LENGTH_SHORT).show()
496
+
497
+ finish()
498
+
499
+
500
+
501
+ }
502
+
503
+
504
+
505
+ private fun addNewTask(){
506
+
507
+
508
+
509
+ var editTextTime:EditText=findViewById(R.id.editTextTime)
510
+
511
+ var editTextTask:EditText=findViewById(R.id.editTextTask)
512
+
513
+ realm.beginTransaction()
514
+
515
+
516
+
517
+ val taskDB=realm.createObject(TaskDB::class.java)
518
+
519
+ taskDB.strTime=editTextTime.text.toString()
520
+
521
+ taskDB.strTask=editTextTask.text.toString()
522
+
523
+ realm.commitTransaction()
524
+
525
+ editTextTask.setText("")
526
+
527
+
528
+
529
+ Toast.makeText(this@EditActivity,"登録完了",Toast.LENGTH_SHORT).show()
530
+
531
+
532
+
533
+ }
534
+
535
+ }
536
+
537
+
538
+
19
539
  ```
20
540
 
21
541
 
22
542
 
23
-
24
-
25
-
26
-
27
-
28
-
29
- ### 該当のソースコード 
30
-
31
-
32
-
33
- ```MainActivity
34
-
35
- package com.example.mytodoapplication
36
-
37
-
38
-
39
- import android.content.Intent
40
-
41
- import android.os.Bundle
42
-
43
- import android.util.Log
44
-
45
- import android.view.View
46
-
47
- import android.widget.AdapterView
48
-
49
- import android.widget.ArrayAdapter
50
-
51
- import android.widget.ListView
52
-
53
- import androidx.appcompat.app.AlertDialog
54
-
55
- import androidx.appcompat.app.AppCompatActivity
56
-
57
- import com.example.mytodoapplication.databinding.ActivityMainBinding
58
-
59
- import io.realm.Realm
60
-
61
- import io.realm.RealmResults
62
-
63
- import java.util.*
64
-
65
-
66
-
67
- class MainActivity : AppCompatActivity() ,AdapterView.OnItemClickListener,AdapterView.OnItemLongClickListener {
68
-
69
- private lateinit var binding: ActivityMainBinding
70
-
71
-
72
-
73
- lateinit var realm: Realm
74
-
75
- lateinit var result: RealmResults<TaskDB>
76
-
77
- lateinit var task_list: ArrayList<String>
78
-
79
- lateinit var adapter: ArrayAdapter<String>
80
-
81
-
82
-
83
- override fun onCreate(savedInstanceState: Bundle?) {
84
-
85
- super.onCreate(savedInstanceState)
86
-
87
- binding = ActivityMainBinding.inflate(layoutInflater)
88
-
89
- setContentView(binding.root)
90
-
91
-
92
-
93
- val listView: ListView = findViewById(R.id.listView)
94
-
95
-
96
-
97
- binding.buttonAddNewWord.setOnClickListener {
98
-
99
- val intent = Intent(this@MainActivity, EditActivity::class.java)
100
-
101
-
102
-
103
- intent.putExtra(getString(R.string.intent_key_status), getString(R.string.status_add))
104
-
105
- startActivity(intent)
106
-
107
-
108
-
109
- }
110
-
111
-
112
-
113
- binding.listView.setOnItemClickListener(this)
114
-
115
- binding.listView.setOnItemLongClickListener(this)
116
-
117
- }
118
-
119
-
120
-
121
-
122
-
123
- override fun onResume() {
124
-
125
- super.onResume()
126
-
127
-
128
-
129
- val listView: ListView = findViewById(R.id.listView)
130
-
131
-
132
-
133
- realm = Realm.getDefaultInstance()
134
-
135
-
136
-
137
- result = realm.where(TaskDB::class.java).findAll().sort("strTime")
138
-
139
-
140
-
141
- task_list = ArrayList<String>()
142
-
143
-
144
-
145
- val length = result.size
146
-
147
- for (i in 0..length - 1) {
148
-
149
- if (result[i]!!.finishFrag) {
150
-
151
- task_list.add(result[i]!!.strTime + ":" + result[i]!!.strTask + "✔️")
152
-
153
- } else {
154
-
155
- task_list.add(result[i]!!.strTime + ":" + result[i]!!.strTask)
156
-
157
- }
158
-
159
- }
160
-
161
-
162
-
163
- var adapter = ArrayAdapter(this, android.R.layout.simple_list_item_1, task_list)
164
-
165
- listView.adapter = adapter
166
-
167
-
168
-
169
- }
170
-
171
-
172
-
173
- override fun onPause(){
174
-
175
- super.onPause()
176
-
177
-
178
-
179
- realm.close()
180
-
181
- }
182
-
183
-
184
-
185
- override fun onItemClick(parent:AdapterView<*>?,view:View?,position:Int,id:Long){
186
-
187
-
188
-
189
- val selectDB=result[position]
190
-
191
- val strSelectTime=result[position]!!.strTime
192
-
193
- val strSelectTask=result[position]!!.strTask
194
-
195
- val strSelectFrag=result[position]!!.finishFrag
196
-
197
- val intent=Intent(this@MainActivity,EditActivity::class.java).apply{
198
-
199
-
200
-
201
- putExtra(getString(R.string.intent_key_time),strSelectTime)
202
-
203
- putExtra(getString(R.string.intent_key_task),strSelectTask)
204
-
205
- putExtra(getString(R.string.intent_key_frag),strSelectFrag)
206
-
207
- putExtra(getString(R.string.intent_key_position),position)
208
-
209
- putExtra(getString(R.string.intent_key_status),getString(R.string.status_change))
210
-
211
- startActivity(intent)
212
-
213
-
214
-
215
- }
216
-
217
-
218
-
219
- }
220
-
221
-
222
-
223
- override fun onItemLongClick(parent:AdapterView<*>?,view:View?,position:Int,id:Long):Boolean{
224
-
225
-
226
-
227
- val listView: ListView =findViewById(R.id.listView)
228
-
229
-
230
-
231
- val selectDB = result[position]!!
232
-
233
- val dialog = AlertDialog.Builder(this@MainActivity).apply {
234
-
235
- setTitle(selectDB.strTask + "の削除")
236
-
237
- setMessage("削除しても良いですか?")
238
-
239
- setPositiveButton("yes") { dialog, which->
240
-
241
-
242
-
243
-
244
-
245
- realm.beginTransaction()
246
-
247
- selectDB.deleteFromRealm()
248
-
249
- realm.commitTransaction()
250
-
251
- task_list.removeAt(position)
252
-
253
- listView.adapter = adapter
254
-
255
-
256
-
257
- }
258
-
259
- setNegativeButton("no") { dialog, which->
260
-
261
- }
262
-
263
- show()
264
-
265
- }
266
-
267
-
268
-
269
- return true
270
-
271
- }
272
-
273
- }
274
-
275
- ```
276
-
277
-
278
-
279
-
280
-
281
-
282
-
283
-
284
-
285
-
286
-
287
- ```EditActivity
288
-
289
- package com.example.mytodoapplication
290
-
291
-
292
-
293
- //import kotlinx.android.synthetic.main.activity_edit.*
294
-
295
- import android.os.Bundle
296
-
297
- import android.widget.CheckBox
298
-
299
- import android.widget.EditText
300
-
301
- import android.widget.TextView
302
-
303
- import android.widget.Toast
304
-
305
- import androidx.appcompat.app.AppCompatActivity
306
-
307
- import com.example.mytodoapplication.databinding.ActivityEditBinding
308
-
309
- import io.realm.Realm
310
-
311
- //import kotlinx.android.synthetic.main.activity_edit.*
312
-
313
- import java.text.SimpleDateFormat
314
-
315
- import java.util.*
316
-
317
-
318
-
319
- class EditActivity : AppCompatActivity() {
320
-
321
-
322
-
323
- lateinit var realm: Realm
324
-
325
- var strTime: String = ""
326
-
327
- var strTask: String = ""
328
-
329
- var intposition: Int = 0
330
-
331
- var boolMemorize: Boolean = false
332
-
333
-
334
-
335
- private lateinit var binding:ActivityEditBinding
336
-
337
-
338
-
339
- override fun onCreate(savedInstanceState: Bundle?) {
340
-
341
- super.onCreate(savedInstanceState)
342
-
343
- binding=ActivityEditBinding.inflate(layoutInflater)
344
-
345
- setContentView(binding.root)
346
-
347
-
348
-
349
- var editTextTime:EditText=findViewById(R.id.editTextTime)
350
-
351
- var editTextTask:EditText=findViewById(R.id.editTextTask)
352
-
353
- var textViewStatus: TextView =findViewById(R.id.textViewStatus)
354
-
355
- var checkBox: CheckBox =findViewById(R.id.checkBox)
356
-
357
-
358
-
359
-
360
-
361
- val df = SimpleDateFormat("MM/dd HH:mm")
362
-
363
- val date = Date()
364
-
365
- editTextTime.setText(df.format(date))
366
-
367
-
368
-
369
- val bundle = intent.extras
370
-
371
- val strStatus = bundle!!.getString(getString(R.string.intent_key_status))
372
-
373
- textViewStatus.text = strStatus
374
-
375
-
376
-
377
- if (strStatus == getString(R.string.status_change)) {
378
-
379
- strTime = bundle.getString (getString(R.string.intent_key_time))!!
380
-
381
- strTask = bundle.getString(getString(R.string.intent_key_task))!!
382
-
383
- boolMemorize = bundle.getBoolean(getString(R.string.intent_key_frag))
384
-
385
-
386
-
387
- editTextTime.setText(strTime)
388
-
389
- editTextTask.setText(strTask)
390
-
391
- checkBox.isChecked = boolMemorize
392
-
393
-
394
-
395
- intposition = bundle.getInt(getString(R.string.intent_key_position))
396
-
397
- }
398
-
399
-
400
-
401
- binding.checkBox.setOnClickListener {
402
-
403
- boolMemorize = checkBox.isChecked
404
-
405
- }
406
-
407
-
408
-
409
- binding.buttonRegister.setOnClickListener {
410
-
411
-
412
-
413
-
414
-
415
-
416
-
417
- if (strStatus == getString(R.string.status_add)){
418
-
419
-
420
-
421
- addNewTask()
422
-
423
- } else {
424
-
425
- changeTask()
426
-
427
- }
428
-
429
- }
430
-
431
-
432
-
433
- binding.buttonBack.setOnClickListener {
434
-
435
-
436
-
437
- finish()
438
-
439
- }
440
-
441
- }
442
-
443
-
444
-
445
- override fun onResume() {
446
-
447
- super.onResume()
448
-
449
-
450
-
451
- realm= Realm.getDefaultInstance()
452
-
453
- }
454
-
455
-
456
-
457
- override fun onPause() {
458
-
459
- super.onPause()
460
-
461
-
462
-
463
- realm.close()
464
-
465
- }
466
-
467
-
468
-
469
- private fun changeTask(){
470
-
471
- val result=realm.where(TaskDB::class.java).findAll().sort("strTime")
472
-
473
- val selectDB=result[intposition]!!
474
-
475
- realm.beginTransaction()
476
-
477
-
478
-
479
- var editTextTime:EditText=findViewById(R.id.editTextTime)
480
-
481
- var editTextTask:EditText=findViewById(R.id.editTextTask)
482
-
483
- var textViewStatus: TextView =findViewById(R.id.textViewStatus)
484
-
485
- var checkBox: CheckBox =findViewById(R.id.checkBox)
486
-
487
-
488
-
489
- selectDB.strTime=editTextTime.text.toString()
490
-
491
- selectDB.strTask=editTextTask.text.toString()
492
-
493
- selectDB.finishFrag=boolMemorize
494
-
495
- realm.commitTransaction()
496
-
497
-
498
-
499
- editTextTime.setText("")
500
-
501
- editTextTask.setText("")
502
-
503
-
504
-
505
- Toast.makeText(this@EditActivity,"修正完了",Toast.LENGTH_SHORT).show()
506
-
507
- finish()
508
-
509
-
510
-
511
- }
512
-
513
-
514
-
515
- private fun addNewTask(){
516
-
517
-
518
-
519
- var editTextTime:EditText=findViewById(R.id.editTextTime)
520
-
521
- var editTextTask:EditText=findViewById(R.id.editTextTask)
522
-
523
- realm.beginTransaction()
524
-
525
-
526
-
527
- val taskDB=realm.createObject(TaskDB::class.java)
528
-
529
- taskDB.strTime=editTextTime.text.toString()
530
-
531
- taskDB.strTask=editTextTask.text.toString()
532
-
533
- realm.commitTransaction()
534
-
535
- editTextTask.setText("")
536
-
537
-
538
-
539
- Toast.makeText(this@EditActivity,"登録完了",Toast.LENGTH_SHORT).show()
540
-
541
-
542
-
543
- }
544
-
545
- }
546
-
547
-
548
-
549
- ```
550
-
551
-
552
-
553
543
  ### 試したこと
554
544
 
555
545
 

3

勘違いしてしまいました。エラーは表示されておりませんでした。

2021/07/12 04:50

投稿

aqua2021
aqua2021

スコア0

test CHANGED
File without changes
test CHANGED
@@ -14,18 +14,10 @@
14
14
 
15
15
  ### 発生している問題・エラーメッセージ
16
16
 
17
- ```error
18
-
19
- kotlin.UninitializedPropertyAccessException: lateinit property adapter has not been initialized
20
-
21
- at com.example.mytodoapplication.MainActivity.getAdapter(MainActivity.kt:24)
22
-
23
- at com.example.mytodoapplication.MainActivity.onItemLongClick$lambda-4$lambda-2(MainActivity.kt:144)
24
-
25
- at com.example.mytodoapplication.MainActivity.lambda$vtXQX_THKAFi8B9LTfJJm8MHPGE(Unknown Source:0)
26
-
27
17
  ```
28
18
 
19
+ ```
20
+
29
21
 
30
22
 
31
23
 

2

質問修正しました。

2021/07/12 04:48

投稿

aqua2021
aqua2021

スコア0

test CHANGED
File without changes
test CHANGED
@@ -14,7 +14,7 @@
14
14
 
15
15
  ### 発生している問題・エラーメッセージ
16
16
 
17
-
17
+ ```error
18
18
 
19
19
  kotlin.UninitializedPropertyAccessException: lateinit property adapter has not been initialized
20
20
 
@@ -24,6 +24,10 @@
24
24
 
25
25
  at com.example.mytodoapplication.MainActivity.lambda$vtXQX_THKAFi8B9LTfJJm8MHPGE(Unknown Source:0)
26
26
 
27
+ ```
28
+
29
+
30
+
27
31
 
28
32
 
29
33
 

1

申し訳ありませんでした。修正いたしました。

2021/07/11 23:55

投稿

aqua2021
aqua2021

スコア0

test CHANGED
File without changes
test CHANGED
@@ -32,13 +32,9 @@
32
32
 
33
33
  ### 該当のソースコード 
34
34
 
35
+
36
+
35
- ######MainActivity
37
+ ```MainActivity
36
-
37
-
38
-
39
-
40
-
41
-
42
38
 
43
39
  package com.example.mytodoapplication
44
40
 
@@ -280,13 +276,19 @@
280
276
 
281
277
  }
282
278
 
283
-
279
+ ```
284
-
285
-
286
-
280
+
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+
287
- ######EditActivity
291
+ ```EditActivity
288
-
289
-
290
292
 
291
293
  package com.example.mytodoapplication
292
294
 
@@ -504,7 +506,7 @@
504
506
 
505
507
 
506
508
 
507
- Toast.makeText(this@EditActivity,"修正完了いたしました",Toast.LENGTH_SHORT).show()
509
+ Toast.makeText(this@EditActivity,"修正完了",Toast.LENGTH_SHORT).show()
508
510
 
509
511
  finish()
510
512
 
@@ -538,7 +540,7 @@
538
540
 
539
541
 
540
542
 
541
- Toast.makeText(this@EditActivity,"登録完了いたしました",Toast.LENGTH_SHORT).show()
543
+ Toast.makeText(this@EditActivity,"登録完了",Toast.LENGTH_SHORT).show()
542
544
 
543
545
 
544
546
 
@@ -548,6 +550,10 @@
548
550
 
549
551
 
550
552
 
553
+ ```
554
+
555
+
556
+
551
557
  ### 試したこと
552
558
 
553
559