-
-
Save Arpit360/1dd88621c5a3de89d87b6432fdbf3bfe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Android.App; | |
using Android.Widget; | |
using Android.OS; | |
var rootActivity= StartedActivities.FirstOrDefault(); | |
var layout = new LinearLayout(rootActivity); | |
layout.Orientation = Orientation.Vertical; | |
var aLabel = new TextView(rootActivity); | |
aLabel.Text = "Hello, World!!!"; | |
var aButton = new Button(rootActivity); | |
aButton.Text = "Say Hello!"; | |
aButton.Click += (sender, e) => | |
{ aLabel.Text = "Hello Android!"; }; | |
layout.AddView(aLabel); | |
layout.AddView(aButton); | |
rootActivity.SetContentView(layout); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment