Skip to content

Instantly share code, notes, and snippets.

@smallgeek
Created December 3, 2012 08:00
Show Gist options
  • Select an option

  • Save smallgeek/4193521 to your computer and use it in GitHub Desktop.

Select an option

Save smallgeek/4193521 to your computer and use it in GitHub Desktop.
using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
namespace FsAndroid1
{
[Activity(Label = "FsAndroid1", MainLauncher = true, Icon = "@drawable/icon")]
public class Activity1 : Activity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.Main);
// Get our button from the layout resource,
// and attach an event to it
Button button = FindViewById<Button>(Resource.Id.MyButton);
button.Click += (_, __) => button.Text = new FsAndroid.Library.Class1().X;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment