-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathactivity.java
More file actions
45 lines (28 loc) · 887 Bytes
/
activity.java
File metadata and controls
45 lines (28 loc) · 887 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
package com.example.sam.npp;
import android.os.Bundle;
import android.app.Activity;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Menu;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
public class Home extends Activity {
public Button button1;
public EditText text1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
button1 = (Button)findViewById(R.id.button1);
text1 = (EditText)findViewById(R.id.text1);
button1.setOnClickListener(
new OnClickListener() {
@Override
public void onClick(View view) {
text1.setText("Hello Krishn");
}
}
);
}
}