回答編集履歴
1
test
CHANGED
@@ -1,29 +1,13 @@
|
|
1
1
|
以下のコードを使うことでできるようになりますよ!
|
2
|
-
|
3
2
|
同様にstopButtonも生成してください。
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
```lang-<ここに言語を入力>
|
8
|
-
|
9
4
|
startButton = (Button) findViewById(R.id.start);
|
10
|
-
|
11
5
|
startButton.setVisibility(1);
|
12
|
-
|
13
6
|
startButton.setOnClickListener(new OnClickListener() {
|
14
|
-
|
15
|
-
|
7
|
+
@Override
|
16
|
-
|
17
|
-
|
8
|
+
public void onClick(View v) {
|
18
|
-
|
19
|
-
|
9
|
+
// startが押されたときに非表示にしてstopを表示する。
|
20
|
-
|
21
|
-
|
10
|
+
startButton.setVisibility(View.GONE);
|
22
|
-
|
23
|
-
|
11
|
+
stopButton.setVisibility(View.VISIBLE);
|
24
|
-
|
25
|
-
|
12
|
+
}
|
26
|
-
|
27
13
|
});
|
28
|
-
|
29
|
-
```
|