Instance.java: code move
[nikiroo-utils.git] / src / be / nikiroo / fanfix / reader / android / SayIt.java
CommitLineData
64968418
NR
1package be.nikiroo.fanfix.reader.android;
2
3import android.app.Activity;
4import android.content.Intent;
5import android.os.Bundle;
6import android.widget.TextView;
7
8
9public class SayIt extends Activity {
10 public static final String MESSAGE = "be.nikiroo.testy.message";
11
12 @Override
13 protected void onCreate(Bundle savedInstanceState) {
14 super.onCreate(savedInstanceState);
15 setContentView(R.layout.activity_say_it);
16
17 // Get the Intent that started this activity and extract the string
18 Intent intent = getIntent();
19 String message = intent.getStringExtra(SayIt.MESSAGE);
20
21 // Capture the layout's TextView and set the string as its text
22 TextView textView = findViewById(R.id.textView);
23 textView.setText(message);
24 }
25}