質問編集履歴
1
試しに10分のボタンを押したときにカウントの時間がセットされるように書きました(実際はされません)
test
CHANGED
File without changes
|
test
CHANGED
@@ -8,8 +8,6 @@
|
|
8
8
|
|
9
9
|
どうすればよいでしょうか?
|
10
10
|
|
11
|
-
tenButton.setOnClickListener(new View.OnClickListener() (10分ボタン)の中身はなくしています。
|
12
|
-
|
13
11
|
作りかけなので汚い文章になってるかもしれません。
|
14
12
|
|
15
13
|
### 発生している問題・エラーメッセージ
|
@@ -66,7 +64,7 @@
|
|
66
64
|
|
67
65
|
private TextView timerText;
|
68
66
|
|
69
|
-
long countNumber =
|
67
|
+
long countNumber = 300000;
|
70
68
|
|
71
69
|
// インターバル msec
|
72
70
|
|
@@ -100,7 +98,7 @@
|
|
100
98
|
|
101
99
|
|
102
100
|
|
103
|
-
|
101
|
+
// インターバルで呼ばれる
|
104
102
|
|
105
103
|
@Override
|
106
104
|
|
@@ -150,10 +148,6 @@
|
|
150
148
|
|
151
149
|
Button stopButton = findViewById(R.id.stop_button);
|
152
150
|
|
153
|
-
Button shitumonButton = findViewById(R.id.shitumon_button);
|
154
|
-
|
155
|
-
Button happyoButton = findViewById(R.id.happyo_button);
|
156
|
-
|
157
151
|
Button fiveButton = findViewById(R.id.five_button);
|
158
152
|
|
159
153
|
Button tenButton = findViewById(R.id.ten_button);
|
@@ -182,6 +176,14 @@
|
|
182
176
|
|
183
177
|
|
184
178
|
|
179
|
+
long countNumber = 600000;
|
180
|
+
|
181
|
+
// インターバル msec
|
182
|
+
|
183
|
+
long interval = 10;
|
184
|
+
|
185
|
+
|
186
|
+
|
185
187
|
}
|
186
188
|
|
187
189
|
});
|
@@ -244,52 +246,10 @@
|
|
244
246
|
|
245
247
|
});
|
246
248
|
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
shitumonButton.setOnClickListener(new View.OnClickListener() {
|
254
|
-
|
255
|
-
@Override
|
256
|
-
|
257
|
-
public void onClick(View v) {
|
258
|
-
|
259
|
-
// 中止
|
260
|
-
|
261
|
-
countDown.cancel();
|
262
|
-
|
263
|
-
timerText.setText(dataFormat.format(0));
|
264
|
-
|
265
|
-
}
|
266
|
-
|
267
|
-
});
|
268
|
-
|
269
|
-
happyoButton.setOnClickListener(new View.OnClickListener() {
|
270
|
-
|
271
|
-
@Override
|
272
|
-
|
273
|
-
public void onClick(View v) {
|
274
|
-
|
275
|
-
// 中止
|
276
|
-
|
277
|
-
countDown.cancel();
|
278
|
-
|
279
|
-
timerText.setText(dataFormat.format(0));
|
280
|
-
|
281
|
-
}
|
282
|
-
|
283
|
-
});
|
284
|
-
|
285
249
|
}
|
286
250
|
|
287
251
|
|
288
252
|
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
253
|
}
|
294
254
|
|
295
255
|
|