-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEx04Activity.java
More file actions
27 lines (22 loc) · 961 Bytes
/
Ex04Activity.java
File metadata and controls
27 lines (22 loc) · 961 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
package org.androidtown.memoapplication;
import android.content.Intent;
//import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
public class Ex04Activity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_ex04_1);
Intent intent = getIntent();
String title = intent.getStringExtra("title");
String content = intent.getStringExtra("content");
String time= intent.getStringExtra("time");
Log.d("My", title + "\t" + content + "\t" + time);
((TextView)findViewById(R.id.title)).setText(title);
((TextView)findViewById(R.id.content)).setText(content);
((TextView)findViewById(R.id.time)).setText(time);
}
}