質問編集履歴

2

訂正

2016/08/16 17:29

投稿

syosinsya12
syosinsya12

スコア69

test CHANGED
File without changes
test CHANGED
@@ -20,19 +20,13 @@
20
20
 
21
21
 
22
22
 
23
- private Context context;
24
-
25
- A(Context c){
26
-
27
- context = c;
28
-
29
23
  }
30
24
 
31
- public void get_i1 (View view){
25
+ public void get_i1 (){
32
26
 
33
27
  double bor = 19.2;
34
28
 
35
- Intent intent = new Intent(context.getApplicationContext(),Input.class);
29
+ Intent intent = new Intent(this,Input.class);
36
30
 
37
31
  intent.putExtra(BOR,bor);
38
32
 
@@ -50,6 +44,10 @@
50
44
 
51
45
 
52
46
 
47
+ public A a = new A ();
48
+
49
+
50
+
53
51
  @Override
54
52
 
55
53
  protected void onCreate(Bundle savedInstanceState) {
@@ -58,15 +56,11 @@
58
56
 
59
57
  setContentView(com.example.sample.name.R.layout.activity_i);
60
58
 
59
+ }
61
60
 
61
+ public void get_i1 (View view){
62
62
 
63
-
64
-
65
- Button i1 = (Button)findViewById(com.example.sample.name.R.id.i1);
66
-
67
- i1.setOnClickListener( new com.example.sample.name.ann.A(this));
63
+ a.get_i1();
68
-
69
-
70
64
 
71
65
  }
72
66
 

1

誤字

2016/08/16 17:29

投稿

syosinsya12
syosinsya12

スコア69

test CHANGED
@@ -1 +1 @@
1
- 違うクラスボタンの処理を書く
1
+ 違うクラスボタンの処理を書く
test CHANGED
File without changes