From the course: Xamarin Essential Training: Create Your First App
Unlock the full course today
Join today to access over 23,200 courses taught by industry experts.
Work with native UI elements - Xamarin Tutorial
From the course: Xamarin Essential Training: Create Your First App
Work with native UI elements
- [Instructor] Now that we've got our application created let's take a closer look at this MainActivity that was created for us. You'll notice on line nine, it derives from AppCompatActivity, and that's what helps us hook up our C# code here with the underlying Java and Android frameworks. It's that Xamarin layer that connects the two. On line eight you'll notice we're still using C# with our attributes. We've got an activity attribute on there that says, hey, this class is an activity. It's got a label, there's a theme to be applied, and we indicate that it's the main launcher, meaning when we run the application or launch it this is the MainActivity that's going to start up. And we'll come back to the syntax of the label. We're accessing a string called app_name to provide that label. We've got a method called OnCreate where we set up everything. This is our initialization of the activity. And since this is the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Create the Android application5m 26s
-
(Locked)
Work with native UI elements6m 34s
-
(Locked)
Test the application on an emulator2m 31s
-
(Locked)
Build the user interfaces4m 3s
-
(Locked)
Connect the data to the UI10m 27s
-
(Locked)
Navigate between UI elements5m 7s
-
(Locked)
Challenge46s
-
(Locked)
Solution2m 56s
-
(Locked)
-
-
-