-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainactivity.java
More file actions
46 lines (25 loc) · 830 Bytes
/
mainactivity.java
File metadata and controls
46 lines (25 loc) · 830 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package com.example.sam.eve;
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Menu;
import android.widget.Button;
import android.widget.EditText;
import static com.example.sam.eve.R.layout.activity_main;
public class MainActivity extends Activity {
Button button1;
EditText text1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
button1=(Button)findViewById(R.id.button1);
text1=(EditText)findViewById(R.id.text1);
}
public void onClick(View v) {
text1.setText("Hello Krishan");
}
}