diff --git a/src/Tizen.Wearable.CircularUI.Forms.Renderer/CircleDateTimeSelectorRenderer.cs b/src/Tizen.Wearable.CircularUI.Forms.Renderer/CircleDateTimeSelectorRenderer.cs index 49a9cb7f..1eda38ce 100644 --- a/src/Tizen.Wearable.CircularUI.Forms.Renderer/CircleDateTimeSelectorRenderer.cs +++ b/src/Tizen.Wearable.CircularUI.Forms.Renderer/CircleDateTimeSelectorRenderer.cs @@ -75,6 +75,14 @@ protected override ElmSharp.Size Measure(int availableWidth, int availableHeight return new ElmSharp.Size(300, 290); } + protected override void UpdateRotaryInteraction(bool enable) + { + if (Element.FindBezelRouter() == null) + { + base.UpdateRotaryInteraction(enable); + } + } + void UpdateMinimum() { Control.MinimumDateTime = Element.MinimumDate; diff --git a/src/Tizen.Wearable.CircularUI.Forms.Renderer/CircleStepperRenderer.cs b/src/Tizen.Wearable.CircularUI.Forms.Renderer/CircleStepperRenderer.cs index c31dabe7..413db378 100644 --- a/src/Tizen.Wearable.CircularUI.Forms.Renderer/CircleStepperRenderer.cs +++ b/src/Tizen.Wearable.CircularUI.Forms.Renderer/CircleStepperRenderer.cs @@ -18,12 +18,11 @@ using Xamarin.Forms; using Xamarin.Forms.Platform.Tizen; using Xamarin.Forms.Platform.Tizen.Native.Watch; -using ElmSharp.Wearable; using ESize = ElmSharp.Size; +using XForms = Xamarin.Forms.Forms; [assembly: ExportRenderer(typeof(Tizen.Wearable.CircularUI.Forms.CircleStepper), typeof(Tizen.Wearable.CircularUI.Forms.Renderer.CircleStepperRenderer))] - namespace Tizen.Wearable.CircularUI.Forms.Renderer { public class CircleStepperRenderer : StepperRenderer @@ -43,6 +42,11 @@ public CircleStepperRenderer() protected new CircleStepper Element => base.Element as CircleStepper; + protected override ElmSharp.Spinner CreateNativeControl() + { + return new WatchSpinner(XForms.NativeParent, this.GetSurface()); + } + protected override void OnElementChanged(ElementChangedEventArgs e) { base.OnElementChanged(e); diff --git a/src/Tizen.Wearable.CircularUI.Forms.Renderer/StepperRenderer.cs b/src/Tizen.Wearable.CircularUI.Forms.Renderer/StepperRenderer.cs new file mode 100644 index 00000000..4c2cd759 --- /dev/null +++ b/src/Tizen.Wearable.CircularUI.Forms.Renderer/StepperRenderer.cs @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using Xamarin.Forms; +using XStepperRenderer = Xamarin.Forms.Platform.Tizen.StepperRenderer; +using CStepperRenderer = Tizen.Wearable.CircularUI.Forms.Renderer.StepperRenderer; + +[assembly: ExportRenderer(typeof(ListView), typeof(CStepperRenderer))] +namespace Tizen.Wearable.CircularUI.Forms.Renderer +{ + public class StepperRenderer : XStepperRenderer + { + protected override void UpdateRotaryInteraction(bool enable) + { + if (Element.FindBezelRouter() == null) + { + base.UpdateRotaryInteraction(enable); + } + } + } +}