From the course: Xamarin.Forms Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Android renderer

Android renderer - Xamarin Tutorial

From the course: Xamarin.Forms Essential Training

Start my 1-month free trial

Android renderer

- [Instructor] Create our renderer for Android first since we're already set up to run the Android project. So come down, and similarly we'll add a folder called Controls, just to have some consistency. We'll add a class there, so new file, class, and we'll call that our NumberEntryRenderer. We have to do a couple of things here. One, we want to derive from the entry renderer that already exists, so add in the name space for the Android renderers. So we're going to allow it to use the default behavior for drawing the text box and doing all of that. We're actually going to change the constructor here a little bit, so it takes a context, again, we'll use the help to add in the Android.Content namespace. And then we'll call down to the base class, and pass that context in. So we got a constructor that we can use there. Then I'm going to override the OnElementChanged method here. Let me get the ElementChangedEventArgs, and…

Contents