a11302afc3
Moved projects around; API still builds successfully
34 lines
873 B
Forth
34 lines
873 B
Forth
namespace MyPrayerJournal.Mobile.Android
|
|
|
|
open System
|
|
|
|
open Android.App
|
|
open Android.Content
|
|
open Android.OS
|
|
open Android.Runtime
|
|
open Android.Views
|
|
open Android.Widget
|
|
|
|
type Resources = MyPrayerJournal.Mobile.Android.Resource
|
|
|
|
[<Activity (Label = "MyPrayerJournal.Mobile.Android", MainLauncher = true, Icon = "@mipmap/icon")>]
|
|
type MainActivity () =
|
|
inherit Activity ()
|
|
|
|
let mutable count:int = 1
|
|
|
|
override this.OnCreate (bundle) =
|
|
|
|
base.OnCreate (bundle)
|
|
|
|
// Set our view from the "main" layout resource
|
|
this.SetContentView (Resources.Layout.Main)
|
|
|
|
// Get our button from the layout resource, and attach an event to it
|
|
let button = this.FindViewById<Button>(Resources.Id.myButton)
|
|
button.Click.Add (fun args ->
|
|
button.Text <- sprintf "%d clicks!" count
|
|
count <- count + 1
|
|
)
|
|
|