Your SlideShare is downloading. ×
Cross-Platform UI Controls, Andrey Baskov
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Cross-Platform UI Controls, Andrey Baskov

1,394

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,394
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
32
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Cross-Platform UI ControlsAndrey Baskov, Touch InstinctMobile Developmentfrom Russia with Love
  • 2. Put your hands up in the air!
  • 3. Spring in Russia
  • 4. In 2 years we’ve written6 720 353Lines of Code using Xamarin
  • 5. Touch Instinct• Mobile outsourcing powered by Xamarin• Superb looking mobile apps• 2.5 years of experience with Xamarin• Always custom and complex UI• 40 geeks doing some crazy mobile stuff
  • 6. Sooner – Wheel-based ToDo List
  • 7. CoinKeeper – Personal Finance
  • 8. Xamarin +Touch Instinct =Components!
  • 9. Xamarin Components• Simplify and speedup development• Use the power of professionals• Available right from Xamarin Studio• Distribute and sell your own components• Visit components.xamarin.com
  • 10. Xamarin ComponentsBefore After
  • 11. You are at the beginning of new Era.Xamarin Era.
  • 12. 2008. Appstore Launch.2013. Xamarin Components.
  • 13. Creating your own component• Get the idea• Crack the code• Publish and set the price• ???• PROFIT!
  • 14. 80% of what you are doingcan be used by others
  • 15. 80% of what you are doingmight be already done byothers
  • 16. Cross-platform UI is that easy:Step 1. Do iOS version.Step 2. Do Android version.Step 3. Do Windows version.
  • 17. Platforms Differ• Different basics• Different UI-guidelines• Different rendering model• Different devices, resolutions and densities
  • 18. UI Differs
  • 19. Adopt UI for each platform
  • 20. Make simple API
  • 21. LockScreen
  • 22. LockScreen APIpublic partial class AppDelegate : UIApplicationDelegate{public override bool FinishedLaunching (UIApplication app, NSDictionary options){Locker.Activate (window);}public override void DidEnterBackground (UIApplication application){Locker.Activate (window);}}
  • 23. LockScreen APIpublic class MyProtectedActivity : PasscodeProtectedActivity{// ...}
  • 24. LockScreen APILocker.Enable ();Locker.Disable ();
  • 25. Make it easy to use,but yet powerful to customize
  • 26. LockScreen customizationpublic class MyLockSettings : DefaultSettings{public override void InitSettings (){base.InitSettings();PasscodeValidator = new MyLockValidator ();}}
  • 27. LockScreen customizationclass MyLocker :Locker<MyLockerSettings> { }MyLocker.Activate();MyLocker.Enable();MyLocker.Disable();
  • 28. Beware of Android!
  • 29. You can’t pass objects to Activity
  • 30. var activity = new Activity(mySettings);
  • 31. var activity = new Activity(mySettings);NO WAY!
  • 32. public static void Start<CustomSettings> (Context context, Mode mode)where CustomSettings : DefaultSettings, new(){var settingsType = typeof(CustomSettings);var intent = new Intent (context, typeof(LockerActivity));intent.PutExtra (ModeKey, (int)mode);intent.PutExtra (SettingsClassNameKey, settingsType.AssemblyQualifiedName);intent.SetFlags (ActivityFlags.NoHistory);context.StartActivity (intent);}Simply passing an object to Android Activity
  • 33. protected override void OnCreate (Bundle bundle){// …if (!(Intent.HasExtra (ModeKey) && Intent.HasExtra (SettingsClassNameKey)))throw new ArgumentException ("LockerActivity needs appropriate Intent to be started.");mode = (Mode)Intent.GetIntExtra (ModeKey, (int)Mode.Activate);var settingsClassName = Intent.GetStringExtra (SettingsClassNameKey);var settings = Activator.CreateInstance (Type.GetType (settingsClassName)) as DefaultSettings;if (settings == null)throw new ArgumentException ("LockerActivity settings must be a subclass ofDefaultSettings");// …}
  • 34. Android isn’t that bad.Android is just fun.
  • 35. Be aware of memory usage• Presence of Garbage Collector doesn’t meanyou don’t have to think about memory• Each time you create an object considerreusing old one• GREFs are your enemy. Dealing with 2 GCs inAndroid is fun.
  • 36. Make it shine• Good description• Nice screenshots• Easy to read Getting Started• All this is must have
  • 37. What’s next• More components• Custom app themes• More UI customization for components• Whatever you would request
  • 38. We need your feedbackHave any idea or comment?Please, send me an email toab@touchinstinct.comorvisit components.xamarin.com
  • 39. Thank you!Andrey BaskovTouch Instinctab@touchinstinct.comtouchinstinct.com

×