Download presentation
Presentation is loading. Please wait.
Published byJames Rose Modified over 8 years ago
1
Xamarin Android Hands On
2
Hands-On: Xamarin Android Ziele – Kennenlernen von Xamarin Android – Native UI – https://developer.xamarin.com/guides/android/
3
Project Setup Create Crossplattform project (Shared Library) Have a look at project structure – Assets – Properties – Resources Drawable Layout Values Hey, it’s Android!
4
Activity [Activity (Label = "LollipopApp", MainLauncher = true, Icon = "@drawable/icon")] -> Attribute gets compiled into AndroidManifest.xml
5
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); } }
6
Native API Full.net and Java API Java.* Javax.* ! Naming conflicts may occur ! e.g. Color, URI Use.net API for higher crossplattform reusability
7
Native API var intent = new Intent(Intent.ActionView); intent.SetData(Android.Net.Uri.Parse ("https://www.ch-open.ch")); StartActivity(intent);
8
AXML Designer Show Designer
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.