Building Cross-Platform iOS/Android Apps with Xamarin, Visual Studio and C# - Part 2

Learn how to use Xamarin to leverage your skills in Microsoft Visual Studio and C# to build cross-platform apps that run on both Android and iOS, and embrace the features and capabilities of each platform.
Course info
Rating
(194)
Level
Intermediate
Updated
Mar 11, 2014
Duration
3h 52m
Table of contents
Course Goals and Requirements
Swipe-Navigation in Android
Swipe-Navigation in iOS
Working with iOS Protocols
Android Master/Detail Navigation
Android Navigation Drawer
iOS Master/Detail Navigation
Description
Course info
Rating
(194)
Level
Intermediate
Updated
Mar 11, 2014
Duration
3h 52m
Description

Learn how to use Xamarin to leverage your skills in Microsoft Visual Studio and C# to build cross-platform apps that run on both Android and iOS. In the second part of this course series, we focus on using Xamarin to build a rich user experience that embraces the capabilities and feel of each platform. In this course we expand the application from part 1 to incorporate rich gesture-based paging, allowing the user to perform swipe actions to move between data items. We introduce a master detail relationship to manage groups of data items utilizing the appropriate metaphor for each platform. We also incorporate platform-specific features such as page-turning animations on iOS and slide-out navigation drawers on Android.

About the author
About the author

Jim Wilson is president of JW Hedgehog, Inc., a consulting firm specializing in solutions for the Android, iOS, and Microsoft platforms. Jim has over 30 years of software engineering experience, with the past 15 years heavily focused on creating mobile device and location-based solutions.

More from the author
More courses by Jim Wilson
Section Introduction Transcripts
Section Introduction Transcripts

Course Goals and Requirements
Welcome to the second course in the Pluralsight series on Cross Platform iOS and Android Apps with Xamarin, Visual Studio, and C#. In this first module we're going to briefly discuss the course goals and requirements. My name is Jim Wilson. Throughout this course, what we're going to do is take the application that we've built in part one of the series and evolve it into something that's much more device-focused, device-friendly, and acts like an app that belongs on the individual platforms of Android and iOS. And we're going to do that by evolving it into a more of a master/detail type of application. So what we're going to do first of all is look at how we can improve the application paging. So as opposed to having those button on the screen, actually have more of a application-friendly swipe-based paging feature. We're then going to look at what's involved in managing multi-screen applications and how to navigate through those screens. Again, we'll do that through our master/detail setup by having high-level course categories that then have details behind them and an individual list of courses. And also throughout the course we're going to look at embracing platform-specific features. We want our applications to have a common functionality on both platforms, but we want to make sure that we're doing the things that are normal and common on the individual platforms that we have there. We want our iOS app to really feel like an iOS app, we want our Android app to really feel like an Android app.

Swipe-Navigation in Android
Welcome to part two of the Pluralsight course series on Cross Platform iOS and Android development with Visual Studio and C#. In this module we'll look at how to implement swipe-navigation in Android. My name is Jim Wilson. In this module, the first thing we'll do is just briefly review the way we implemented navigation of our application in part one of this series. We'll then go into the architectural overview of how we implement swipe-navigation in Android and what are all the pieces involved in that. We'll then look at our ViewModel over our course list and see how we have to make what we have to do to it to make it compatible with user interfaces expectations when using swipe-navigation. We'll then look at the Android support library, a set of classes beyond normal classes that are part of the core Android API. We'll then look at something called the FragmentStatePagerAdapter, a really key class in tying the user interface components of swipe-navigation to our underlying data, and then into the way we represent that on the user interface. And then we finish up by tying it all together within the activity to provide swipe-navigation within our application.

Swipe-Navigation in iOS
Welcome to part two of the Pluralsight course series on Cross Platform iOS and Android Development with Visual Studio and C#. In this module we're going to look at how to implement swipe-navigation in iOS. My name is Jim Wilson. The first thing we're going to do is just quickly look at the way our iOS navigation was implemented from part one of the series, just look at that very briefly. We'll then look at the architectural overview of how we make swipe-navigation work in iOS. It's similar to what we did in Android, but there's a lot of differences as well. We'll then look at the UIPageViewController class, which is really the core class in the swipe-navigation that we'll implement. We'll then dig into using UIViewController instances throughout our application to represent multiple screens within the application. We'll then look at the navigation events tied in to paging through the screens in our application. Then finally we'll take a look at how do we actually add page-turning effects, that kind of rich sense of turning a page in book when the user swipes across the screen in your application.

Working with iOS Protocols
Welcome to part two of the Pluralsight series on Cross Platform iOS and Android Development with Visual Studio and C#. In this module, I'm going to look at Working with iOS Protocols. My name is Jim Wilson. So in this module, the first thing we'll look at is answering the question: what are protocols? We'll then take a look at the way we implemented swipe-navigation in Xamarin and C# using delegates versus the way iOS expects you to do it in Objective-C using protocols. We'll then look at the challenge of bringing protocols into the Xamarin/C# environment. Once we understand that challenge, we'll get implementing protocols inside of the Xamarin/C# environment. And then finally we'll actually implement our swipe-navigation using protocols inside of our Xamarin and C# environment.

Android Master/Detail Navigation
Welcome to the next module in our series on Cross-Platform Android and iOS Development with Visual Studio and C#. In this module, we'll look at creating Master/Detail Navigation in Android. My name is Jim Wilson. In this module, the first thing we're going to look at is to get an overview of the Master/Detail experience, how do we expect our application to behave, and how has our data model changed our application to support a Master/Detail relationship. We'll then look at creating a ListActivity, basically just an activity that allows us to show a list of data that the user can select from. We'll then look at how we can populate the list using one of the built-in adapters called an ArrayAdapter. Then we'll look at creating Custom ListAdapters, which allow us to create data-binding behavior over our own custom data types. We'll then look at how we start the detail activity, how do we actually launch one activity from another and then we'll finish up with the concept of Passing Intent Extras, how do we provide additional data to an activity when we launch it from another activity.

Android Navigation Drawer
Welcome to the next module in our series on Cross-Platform iOS and Android Development with Visual Studio and C#. In this module, we're going to look into Android Navigation Drawers. My name is Jim Wilson. The first thing we'll do in this module is give an overview of what navigation drawers are, why they exist and why they're useful. We'll then look at how using a navigation drawer changes the architecture of the activities in our application. We'll then add a navigation drawer to our application by modifying our activities layout resources. We'll then populate our navigation drawer with a ListView showing the list of course categories we have. We'll then customize the appearance of the ListView in our navigation drawer. We'll then show how to take the FragmentStatePagerAdapter that we've been using to show the list of courses and actually update it to be able to show a different list of courses throughout the life of the application. And then finally, we'll finish up by completing our application to allow the user to select different course categories from a navigation drawer and see the list of courses change directly within a single activity.

iOS Master/Detail Navigation
Welcome to the next module in our series on Cross-Platform iOS and Android Development with Visual Studio and C#. In this module, we are going to look at how to create Master/Detail navigation in an IOS application. My name is Jim Wilson. Throughout this module, we're going to look at creating that Master/Detail navigational experience of having users to see the list of course Categories. Then, as they select a category, see the underlying list of courses that go along with it. As we do this, we need to understand what the iOS experience should be like when users are interacting with data this way, so we'll go over that experience and how the architecture is implemented to do that. We'll then look at the UITableViewController, one of the most commonly used UI display types in iOS and we use that to display a list of data as a table. We then look at how we provide a list of data to go into that table through the UITableViewSource class. We'll then look at the UINavigationController, an essential class to managing transitions between one screen and another in iOS. We'll then look at how to handle the user selection to then display the appropriate Detail UIViewController based on that selection. And then we'll finish up by talking about an issue that comes up with having to share our projects between Visual Studio on our PCs and Xamarin Studio in iOS, and how we can get an error when we first try to open up these projects, but then show what's going on behind the scenes and how to deal with that issue so we can work effectively between the two environments.