teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

3

不要コード削除

2021/06/20 23:25

投稿

imatya999
imatya999

スコア38

title CHANGED
File without changes
body CHANGED
@@ -79,16 +79,7 @@
79
79
  super.onCreate(savedInstanceState)
80
80
  setContentView(R.layout.activity_main)
81
81
 
82
- val button0:Button=findViewById(R.id.button0)
83
- val button1:Button=findViewById(R.id.button1)
84
-
85
- val list = quizData.toList()
86
- val quizList = list.shuffled()
87
-
88
- button0.text = quizList[0]
82
+ //中略
89
- button1.text = quizList[1]
90
-
91
-
92
83
  }
93
84
 
94
85
  fun checkAnswer(view: View){

2

不要な行を削除

2021/06/20 23:25

投稿

imatya999
imatya999

スコア38

title CHANGED
File without changes
body CHANGED
@@ -95,9 +95,6 @@
95
95
  val textView:TextView = findViewById(R.id.textView)
96
96
  val touchBtn = view as Button
97
97
 
98
-
99
-
100
- //7)条件分岐
101
98
  if(touchBtn.text==quizData[0]){
102
99
  textView.text="正解"
103
100
 

1

詳細を追記した

2021/06/20 02:00

投稿

imatya999
imatya999

スコア38

title CHANGED
File without changes
body CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  と表示されまして。
11
11
  一応、無視してもエミュレータは正常に動くので致命傷ではなさそうなのですが
12
- 今後、選択肢を増やすことを想定した場合、
12
+ 今後、Button選択肢を増やすことを想定した場合、
13
13
  何が原因で、どう書き直せばいいのか、ちゃんと対処法を知っておきたい
14
14
 
15
15
  ### 発生している問題・エラーメッセージ