Learn how to define activities that provide the controller code for your screens.
- [Instructor] If we take a look at what got created…with our new project, we'll see,…that the main resource we find is this MainActivity.cs file,…and in there we have the MainActivity class.…You can see on line eight that that derives from Activity,…and that's gonna be our base class for modeling out the code…that represents a screen in our application.…Notice that on line seven we have an attribute…indicating that this is an activity,…it provides some label information and an icon for it,…but it also has a MainLauncher attribute in there,…indicating that this is gonna be our main activity…or our starting activity.…
Now activities have a lifetime.…You can see here one of the core methods,…the OnCreate that we've overidden,…that indicates that our activity has been created,…and it's gonna be displayed on the screen.…There are a number of these different lifetime events…that you can tap into, both to initialize your activity,…or, if an activity's going to be removed,…and you need persist some state.…Couple other things to notice in our activity,…
- Cross-platform code reuse
- Visual Studio install guidelines
- Remote Windows development
- Creating a .NET Standard library
- Testing on an Emulator
- Navigating a segue
- Provisioning and testing on a device
- Using constraints for a layout
- Creating list views and detail views
Skill Level Beginner
1. Welcome to Xamarin
2. Xamarin on Mac
3. Xamarin on Windows
4. Building a Shared Library
5. Building an Android Application
6. Building an iOS Application
7. Building a UWP Application
Next steps1m 11s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.