Use correct renderers for pre-AppCompat (#1044)

* Use correct renderers for pre-AppCompat activity

* Removed extraneous using

* Fix formatting
This commit is contained in:
E.Z. Hart 2017-07-24 16:56:55 -04:00 коммит произвёл GitHub
Родитель 19aeca655e
Коммит b19c401312
2 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -35,14 +35,14 @@ namespace Xamarin.Forms.Platform
[RenderWith (typeof (EditorRenderer))]
internal class _EditorRenderer { }
#if __ANDROID__
[RenderWith (typeof (Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer))]
[RenderWith(typeof(Xamarin.Forms.Platform.Android.LabelRenderer))]
#else
[RenderWith (typeof (LabelRenderer))]
#endif
internal class _LabelRenderer { }
#if __ANDROID__
[RenderWith(typeof(Xamarin.Forms.Platform.Android.FastRenderers.ImageRenderer))]
[RenderWith(typeof(Xamarin.Forms.Platform.Android.ImageRenderer))]
#else
[RenderWith (typeof (ImageRenderer))]
#endif

Просмотреть файл

@ -119,8 +119,10 @@ namespace Xamarin.Forms.Platform.Android
RegisterHandlerForDefaultRenderer(typeof(Button), typeof(FastRenderers.ButtonRenderer), typeof(ButtonRenderer));
RegisterHandlerForDefaultRenderer(typeof(Switch), typeof(AppCompat.SwitchRenderer), typeof(SwitchRenderer));
RegisterHandlerForDefaultRenderer(typeof(Picker), typeof(AppCompat.PickerRenderer), typeof(PickerRenderer));
RegisterHandlerForDefaultRenderer(typeof(Frame), typeof(AppCompat.FrameRenderer), typeof(FrameRenderer));
RegisterHandlerForDefaultRenderer(typeof(Frame), typeof(FastRenderers.FrameRenderer), typeof(FrameRenderer));
RegisterHandlerForDefaultRenderer(typeof(CarouselPage), typeof(AppCompat.CarouselPageRenderer), typeof(CarouselPageRenderer));
RegisterHandlerForDefaultRenderer(typeof(Label), typeof(FastRenderers.LabelRenderer), typeof(LabelRenderer));
RegisterHandlerForDefaultRenderer(typeof(Image), typeof(FastRenderers.ImageRenderer), typeof(ImageRenderer));
_renderersAdded = true;
}