Xamarin Android Hands On
Hands-On: Xamarin Android Ziele – Kennenlernen von Xamarin Android – Native UI –
Project Setup Create Crossplattform project (Shared Library) Have a look at project structure – Assets – Properties – Resources Drawable Layout Values Hey, it’s Android!
Activity [Activity (Label = "LollipopApp", MainLauncher = true, Icon = -> Attribute gets compiled into AndroidManifest.xml
Activity public class MainActivity : 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 var button = FindViewById (Resource.Id.myButton); } }
Native API Full.net and Java API Java.* Javax.* ! Naming conflicts may occur ! e.g. Color, URI Use.net API for higher crossplattform reusability
Native API var intent = new Intent(Intent.ActionView); intent.SetData(Android.Net.Uri.Parse (" StartActivity(intent);
AXML Designer Show Designer