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.
Solution - Xamarin Tutorial
From the course: Xamarin Essential Training: Create Your First App
Solution
(techno intro music) - [Speaker] We'll start our solution by going to the Product class. And I'm simply going to use the prop, tab, tab. I'm going to say this is an int, yet, I'm going to call it Id. And that's all I need to do there. We'll go to the MainActivity. Remember we had this chained logic here, we can put things in here. So I'll do a PutExtra, I'm going to call it id, and then I'm going to use that selectedProduct.id. That now is going to put that integer value in there. And then we come to the ProductDetailActivity. You'll remember, we were getting those values out of that Intent. So I'm going to copy this. Add a new line, we'll paste that. And here I'm going to get the productId. We're going to have to create this cause we don't have it yet. I need another label and I'm going to try to GetIntExtra. And we'll call that, or we'll refer to that with the id value. And of course, since that's an int, and we're…
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)
-
-
-