Commit | Line | Data |
---|---|---|
64968418 NR |
1 | package be.nikiroo.fanfix.reader.android; |
2 | ||
3 | import android.app.Activity; | |
4 | import android.content.Intent; | |
5 | import android.os.Bundle; | |
6 | import android.widget.TextView; | |
7 | ||
8 | ||
9 | public 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 | } |