Effective Navigation in Xamarin.Android
-
Upload
james-montemagno -
Category
Technology
-
view
114 -
download
2
description
Transcript of Effective Navigation in Xamarin.Android
![Page 1: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/1.jpg)
Effective Navigation in Xamarin.Android
James MontemagnoDeveloper Evangelist at Xamarin
@JamesMontemagno | www.motzcod.es
![Page 2: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/2.jpg)
Who am I?
That’s me!
![Page 3: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/3.jpg)
Who am I?I Live Here:
That’s me!
![Page 4: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/4.jpg)
Who am I?
That’s me!
I Live Here:
![Page 5: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/5.jpg)
Who am I?
That’s me!
I Live Here:
I Ride:
![Page 6: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/6.jpg)
Who am I?
I Made These:That’s me!
I Live Here:
I Ride:
![Page 7: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/7.jpg)
http://www.flickr.com/photos/nicwise/7677409508/
![Page 8: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/8.jpg)
Creating beautiful apps in Xamarin.Android
Navigation Drawer Up & Back Navigation
What’s in this talk?
![Page 9: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/9.jpg)
…..well, let me tell you!
Why talk about Navigation?
![Page 10: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/10.jpg)
So many ways to navigate!
Lists
My Media Center
![Page 11: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/11.jpg)
So many ways to navigate!
Dashboards
Seattle Find It, Fix It
![Page 12: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/12.jpg)
So many ways to navigate!
Tabs
![Page 13: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/13.jpg)
So many ways to navigate!
Drop Downs
Vevo
![Page 14: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/14.jpg)
So many ways to navigate!
Ugly Drop Downs
Square Wallet
![Page 15: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/15.jpg)
So many ways to navigate!
Flyouts
![Page 16: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/16.jpg)
Way too many ways!
![Page 17: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/17.jpg)
Enter Navigation Drawer!!
![Page 18: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/18.jpg)
How it works:
http://developer.android.com/design/patterns/navigation-drawer.html
![Page 19: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/19.jpg)
Why Navigation Drawer?
● Standard Control
● Easy to implement
● Highly Customizable
● User familiarity
TweedleGoogle Drive
![Page 20: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/20.jpg)
Demo Time!
Let’s Code!
![Page 21: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/21.jpg)
Tips
● Show specific menu items when drawer opens or closes
● Show your users how to navigate on first run
![Page 22: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/22.jpg)
Compatibility
● ActionBarSherlock!
http://components.xamarin.com/view/XamarinActionBarSherlock/
![Page 23: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/23.jpg)
But wait there’s more!
![Page 24: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/24.jpg)
http://developer.android.com/design/patterns/navigation.html
![Page 25: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/25.jpg)
What’s Up Navigation?
Let me show you!
![Page 26: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/26.jpg)
Activity Launched by Intent Filters
Create a new backstack!a. Add ParentActivity + Metadata to Activity then:
![Page 27: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/27.jpg)
What about Back Navigation?
![Page 28: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/28.jpg)
Deep Link
1. Activity was launched via external source like a notification.
2. Add ParentActivity Information to Activity3. Create a new backstack when launching Intent.
![Page 29: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/29.jpg)
Fragment Navigation
1. Master & Detail Flow2. Pressing back on detail fragment should go back to
Master fragment3. Add it to the back stack in the transaction!
You can use FragmentManager or SupportFragmentManager
![Page 30: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/30.jpg)
Back Navigation Situations
3. WebView Navigationa. WebView maintains it’s own backstackb. Override OnBackPressed:
Hybrid Apps with Ryan Paul: http://xamarin.com/evolve/2013#session-g1idcxy2rm
![Page 31: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/31.jpg)
Creating beautiful apps in Xamarin.Android
Navigation Drawer Up & Back Navigation
![Page 32: Effective Navigation in Xamarin.Android](https://reader034.fdocuments.us/reader034/viewer/2022051819/54c8124b4a7959ee7a8b4571/html5/thumbnails/32.jpg)
Navigation Drawer:● Get Xamarin.Android: xamarin.com● GitHub Sample: http://bit.ly/NavigationDrawerSample● Navigation Drawer Icons : http://bit.ly/NavigationDrawerIcons● These Slides: http://bit.ly/NavigationDrawerSlides
Awesome Stuff:● MvvmCross: http://mvvmcross.wordpress.com● ViewPagerIndicator: http://bit.ly/XamarinViewPagerIndicator
Me: @JamesMontemagno | www.motzcod.es
Go Make Apps with Beautiful Navigation!