質問編集履歴
2
コードを追加しました。遅れてすみません。
title
CHANGED
File without changes
|
body
CHANGED
@@ -211,4 +211,63 @@
|
|
211
211
|
return hand
|
212
212
|
}
|
213
213
|
}
|
214
|
+
```
|
215
|
+
|
216
|
+
```ここに言語を入力
|
217
|
+
コード ///activity_main.xml///
|
218
|
+
<?xml version="1.0" encoding="utf-8"?>
|
219
|
+
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
220
|
+
xmlns:app="http://schemas.android.com/apk/res-auto"
|
221
|
+
xmlns:tools="http://schemas.android.com/tools">
|
222
|
+
|
223
|
+
<ImageButton
|
224
|
+
android:id="@+id/choki"
|
225
|
+
android:layout_width="100dp"
|
226
|
+
android:layout_height="100dp"
|
227
|
+
android:layout_marginStart="8dp"
|
228
|
+
android:layout_marginTop="8dp"
|
229
|
+
android:layout_marginEnd="8dp"
|
230
|
+
android:layout_marginBottom="8dp"
|
231
|
+
android:scaleType="fitCenter"
|
232
|
+
app:layout_constraintBottom_toBottomOf="parent"
|
233
|
+
app:layout_constraintEnd_toEndOf="parent"
|
234
|
+
app:layout_constraintStart_toStartOf="parent"
|
235
|
+
app:layout_constraintTop_toTopOf="parent"
|
236
|
+
app:srcCompat="@drawable/choki" />
|
237
|
+
|
238
|
+
<ImageButton
|
239
|
+
android:id="@+id/pa"
|
240
|
+
android:layout_width="100dp"
|
241
|
+
android:layout_height="100dp"
|
242
|
+
android:layout_marginStart="8dp"
|
243
|
+
android:scaleType="fitCenter"
|
244
|
+
app:layout_constraintStart_toEndOf="@+id/choki"
|
245
|
+
app:layout_constraintTop_toTopOf="@+id/choki"
|
246
|
+
app:srcCompat="@drawable/pa" />
|
247
|
+
|
248
|
+
<ImageButton
|
249
|
+
android:id="@+id/gu"
|
250
|
+
android:layout_width="100dp"
|
251
|
+
android:layout_height="100dp"
|
252
|
+
android:layout_marginEnd="8dp"
|
253
|
+
android:scaleType="fitCenter"
|
254
|
+
app:layout_constraintEnd_toStartOf="@+id/choki"
|
255
|
+
app:layout_constraintTop_toTopOf="@+id/choki"
|
256
|
+
app:srcCompat="@drawable/gu" />
|
257
|
+
|
258
|
+
<TextView
|
259
|
+
android:id="@+id/textView"
|
260
|
+
android:layout_width="wrap_content"
|
261
|
+
android:layout_height="wrap_content"
|
262
|
+
android:layout_marginStart="8dp"
|
263
|
+
android:layout_marginTop="8dp"
|
264
|
+
android:layout_marginEnd="8dp"
|
265
|
+
android:layout_marginBottom="8dp"
|
266
|
+
android:text="@string/janken_text"
|
267
|
+
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
268
|
+
app:layout_constraintBottom_toTopOf="@+id/choki"
|
269
|
+
app:layout_constraintEnd_toEndOf="parent"
|
270
|
+
app:layout_constraintStart_toStartOf="parent"
|
271
|
+
app:layout_constraintTop_toTopOf="parent" />
|
272
|
+
</androidx.constraintlayout.widget.ConstraintLayout>
|
214
273
|
```
|
1
codeボタンを使って編集しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -3,8 +3,9 @@
|
|
3
3
|
#直面している課題
|
4
4
|
このプログラムで三回勝ったときor三回負けたときにirasutoyahappy.png or irasutoyabad.pngを表示できるようにしたいのと、"次へ"というボタンをじゃんけんが終わるごとに表示したいです。
|
5
5
|
情報が足りない場合は載せますのでご指摘ください。
|
6
|
+
|
6
|
-
|
7
|
+
```ここに言語を入力
|
7
|
-
|
8
|
+
コード///mainactivity///
|
8
9
|
|
9
10
|
package com.example.janken
|
10
11
|
|
@@ -44,8 +45,10 @@
|
|
44
45
|
}
|
45
46
|
}
|
46
47
|
}
|
48
|
+
```
|
47
49
|
|
50
|
+
```ここに言語を入力
|
48
|
-
///resultactivity///
|
51
|
+
コード///resultactivity///
|
49
52
|
|
50
53
|
package com.example.janken
|
51
54
|
|
@@ -207,4 +210,5 @@
|
|
207
210
|
}
|
208
211
|
return hand
|
209
212
|
}
|
210
|
-
}
|
213
|
+
}
|
214
|
+
```
|