Setting up the SpeechTalk.Droid project
Let's do the same for Android and set up Xamarin.Forms
accordingly. Inside our Android project, open the MainActivity.cs
class and look at the OnCreate
function:
[Activity (Label = "SpeechTalk.Droid", Icon = "@drawable/icon", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)] public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity { protected override void OnCreate (Bundle bundle) { base.OnCreate (bundle); global::Xamarin.Forms.Forms.Init (this, bundle); LoadApplication (new App ()); } }
The MainActivity
class must inherit Xamarin.Forms.Platform.Android.FormsApplicationActivity
; we must call the super class OnCreate
method ...
Get Xamarin Blueprints now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.