4. Android L Major Features
ART Runtime
Material Design
Widgets, Views, and Shadows
Animations
Notifications
Compatibility
5. Android L Major Features
ART
Runtime
Ahead-of-Time compilation
Improved Garbage Collection
Improved Debugging Support
6. Android L Major Features
Material
Design
Material metaphor Bold, graphic, intentional Motion provides meaning
google.com/design/spec/material-design/introduction.html
7. Brand new style for
applications.
• Theme.Material
• Theme.Material.Light
• Theme.Material.Light.
DarkActionBar
Material Design
8. colorPrimary – App
Branding Color
colorPrimaryDark – Status
bar & contextual bars
colorAccent – Theme UI
Controls (ie. checkbox)
Material Design – Color Palette
10. Extract Prominent
Colors from Image
6 Palettes Generated
Material Design –Palettes
Generate a color pallet from an image
https://www.nuget.org/packages/Xamarin.Android.Support.v7.Palette/
11. Material Design – Drawable Tint
Bitmaps as alpha maps
android:tint=“@color/blue”
13. Android L Major Features
View and
Shadows
CardView
RecyclerView
Elevation
14. CardView
Wrap any view in a CardView
https://www.nuget.org/packages Xamarin.Android.Support.v7.CardView/
15. RecyclerView
High speed efficient ListView
Includes layout manager for positioning items
Default animations for common item operations
https://www.nuget.org/packages/Xamarin.Android.Support.v7.RecyclerView/
22. Default Touch Feedback Animation:
RippleDrawable
Set Background to:
• ?android:attr/selectableItemBackgro
und
• ?android:attr/selectableItemBackgro
undBorderless
Create custom RippleDrawable using
the ripple element
Animation – Touch Feedback
24. Animation – Activity Transitions
Custom animations for enter and exit transitions
of activities
• Enter: How views in the activity enter
• Exit: How view in activity exit
• Shared Elements: How views that are shared
between 2 activities animate
25. Android L Major Features
Notifications
Lock Screen Notifications
Notifications Metadata
Unified Notifications
26. New APIs – Lock Screen Notifications (Android L)
Android.App.Notification.Builder.SetVisibility()
• Private: Shows basic information such as icon, but
hides full content
• Public: Show the notification's full content
• Secret: Show nothing, excluding even the
notification’s icon
27. New APIs – Notifications Metadata (Android L)
SetCategory(): Tells the system how to handle
notifications when the device is in Do not Disturb
SetPriority(): Set to Max or High to appear in a
small floating window if the sound also has a vibration
or sound.
AddPerson(): Add a list of people to notification.
30. Android L Major Features
Compatibility
& More
New APIs
Android L Small Features
Google Play Services via NuGet
31. New APIs – Compatibility
Material Theme
• Only available in Android L
Developer Preview
o Define theme that inherits from
older theme (like Holo) in
res/values/styles.xml
o Define them with same name that
inherits from Material in res/values-v21/
styles.xml
o Set theme as your app’s theme in
manifest file
Layouts
• Do not use any of the new XML attributes from
Android L Developer Preview, they will not work
with previous versions of Android.
• You must provide alternative layouts if you wish
to use them
o L Preview Layouts: res/layout-v21/
o Alternative Layouts: res/layout/
o Do avoid duplication of code, define styles in
res/values/
o Modify the style in res/values-v21/ for new APIs
32. New APIs – Compatibility
UI Widgets
• Support v7: RecyclerView & CardView
o Limitations (pre-L Preview):
o CardView falls back to
programmatic shadows
implementation using additional
padding
o CardView does not clip its children
that intersect with rounded corners
Animations
• Following are Android L Developer Preview ONLY:
o Activity Transitions
o Touch feedback
o Reveal animations
o Path-based animations
33. Android L Small Features
Camera
• Enhanced image and
video capturing. Capture
Raw sensor data.
Multi-networking
• Dynamically scan for
available network with
specific capability and
automatically connect.
BLE Peripheral Mode
• Apps that connect to devices
such as pedometer or health
monitor and transfer data to
another BLE device.
Document-Centric Recents
Job Scheduler
34. Google Play Services via NuGet
Play Game Services: event –based challenges, saved
games, and game profiles
App Indexing API
Google Cast: Media tracks for closed captioning
Wallet: Save to Wallet, geo-fenced in-store notifications,
split tender between wallet & card
Analytics: Measure product impressions/product clicks
Mobile Ads: in-app purchase ads
Dynamic Security Provider
39. Android Wear – Building Apps
Companion App
• Android app that runs on a wearable
New Themes
New UI Widgets
• BoxInsetLayout
• CircledImageView
• WearableListView
• More…
http://www.nuget.org/packages/Xamarin.Android.Wear/
40. Android Wear – Sync Data
Exposed via Google Play Services
• Data API
o Sync datastore between phone and wearable
Message API
o Send small payloads and simple
o communication
http://www.nuget.org/packages/Xamarin.GooglePlayServicesJellyBean/
44. Android TV Features
Made for TV
• Pre-built fragments for browsing & interacting
with media catalogs
In-App Searching
• Voice input for searching content
Recommendations
• Suggest content from your app
Chromecast Built-in
45. Android TV ADT-1 Development Kit
http://developer.android.com/tv/index.html
46. Android TV + Xamarin
Available via NuGet
• https://www.nuget.org/packages/Xamarin.Android.Support.v17.Leanback
Samples:
• https://github.com/xamarin/monodroid-samples
47. Android Recap
• Android L Developer Preview
• Material Design
• Views & Animations
• Notifications
• Android Wear
• Notifications & Companion Apps
• Android TV
48. Resources
Tips for Your First Wear App
http://blog.xamarin.com/tips-for-your-first-android-wear-app/
Android L Documentation
http://developer.xamarin.com/guides/android/platform_features/android_l/introduc
tion_to_android_l/
Samples
http://developer.xamarin.com/samples/android/
49. Q & A
James Montemagno
Developer Evangelist, Xamarin
@JamesMontemagno
Editor's Notes
Only available in Android L Developer Preview
You might run into issues with ART if you:
-Use JNI to run C/C++ code
-Generate non-standard code (like obfuscators)
-Use compacting garbage collection techniques
Only available in Android L Developer Preview
Available in Android.Support.v7 library from NuGet
Available in Android.Support.v7 library from NuGet
Available in Android.Support.v7 library from NuGet
Available in Android.Support.v7 library from NuGet
Only available in Android L Developer Preview
Available in Android.Support.v7 library from NuGet
Available in Android.Support.v7 library from NuGet
Available in Android.Support.v7 library from NuGet
Only available in Android L Developer Preview
Available in Android.Support.v7 library from NuGet
Available in Android.Support.v7 library from NuGet
Available in Android.Support.v7 library from NuGet
Only available in Android L Developer Preview
Available in Android.Support.v7 library from NuGet
Available in Android.Support.v7 library from NuGet
Available in Android.Support.v7 library from NuGet
Only available in Android L Developer Preview
Available in Android.Support.v7 library from NuGet
Available in Android.Support.v7 library from NuGet
Available in Android.Support.v7 library from NuGet
Available in Android.Support.v7 library from NuGet