Hello world in Xamarin Android

1. Create new android project and run it through emulator.
2.Drag a button to designer and name it to btnTest
3.Paste the code in MainActivity.cs

[Activity(Label = “App1”, MainLauncher = true, Icon = “@drawable/icon”)] public class MainActivity : Activity
int count = 0;
protected override void OnCreate(Bundle bundle)
// Set our view from the “main” layout resource

// Create your application here
Android.Widget.Button button = FindViewById

Leave a Reply

Your email address will not be published. Required fields are marked *