forked from dotnet/android-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SecondActivity.cs
32 lines (27 loc) · 904 Bytes
/
SecondActivity.cs
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
namespace HelloMultiScreen
{
[Activity (Label = "SecondActivity")]
public class SecondActivity : Activity
{
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
// Load the UI defined in Second.axml
SetContentView (Resource.Layout.Second);
// Get a reference to the TextView
var label = FindViewById<TextView> (Resource.Id.screen2Label);
// Populate the TextView with the data that was added to the intent in FirstActivity
label.Text = Intent.GetStringExtra("FirstData") ?? "Data not available";
}
}
}