From 1944016ff0c5f2c7587be8bce801cd788bfe4572 Mon Sep 17 00:00:00 2001 From: Dongsug Song Date: Tue, 15 Dec 2020 11:54:44 +0900 Subject: [PATCH] [NUI] Change "IsTapGestureFeedback" as "Feedback" --- src/Tizen.NUI.Components/Controls/Control.cs | 7 +++---- .../Tizen.NUI.Samples/Samples/SwitchSample.cs | 16 ++++++++-------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/Tizen.NUI.Components/Controls/Control.cs b/src/Tizen.NUI.Components/Controls/Control.cs index e6c121d..3e07fbd 100755 --- a/src/Tizen.NUI.Components/Controls/Control.cs +++ b/src/Tizen.NUI.Components/Controls/Control.cs @@ -98,11 +98,10 @@ namespace Tizen.NUI.Components } /// - /// The flag of sound feedback when tap gesture detected. + /// Enable/Disable a sound feedback when tap gesture detected. /// - /// This will be public opened in tizen_6.5 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - public bool IsTapGestureFeedback { get; set; } = false; + public bool Feedback { get; set; } = false; /// Internal used. [EditorBrowsable(EditorBrowsableState.Never)] @@ -235,7 +234,7 @@ namespace Tizen.NUI.Components [EditorBrowsable(EditorBrowsableState.Never)] protected virtual void OnTapGestureDetected(object source, TapGestureDetector.DetectedEventArgs e) { - if (IsTapGestureFeedback && e?.TapGesture?.State == Gesture.StateType.Started) + if (Feedback && e?.TapGesture?.State == Gesture.StateType.Started) { if (feedback != null && feedback.IsSupportedPattern(FeedbackType.Sound, "Tap")) { diff --git a/test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/SwitchSample.cs b/test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/SwitchSample.cs index 50e152b..61b7472 100755 --- a/test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/SwitchSample.cs +++ b/test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/SwitchSample.cs @@ -225,7 +225,7 @@ namespace Tizen.NUI.Samples utilitySwitch[i].ApplyStyle(utilitySt); utilitySwitch[i].Size = new Size(96, 60); utilitySwitch[i].Margin = new Extents(100, 0, 20, 0); - utilitySwitch[i].IsTapGestureFeedback = true; + utilitySwitch[i].Feedback = true; parentView[2].Add(utilitySwitch[i]); } for (i = 0; i < 4; i++) @@ -233,7 +233,7 @@ namespace Tizen.NUI.Samples familySwitch[i] = new Switch(); familySwitch[i].ApplyStyle(familySt); familySwitch[i].Size = new Size(96, 60); - familySwitch[i].IsTapGestureFeedback = true; + familySwitch[i].Feedback = true; parentView[2].Add(familySwitch[i]); } for (i = 0; i < 4; i++) @@ -241,7 +241,7 @@ namespace Tizen.NUI.Samples foodSwitch[i] = new Switch(); foodSwitch[i].ApplyStyle(foodSt); foodSwitch[i].Size = new Size(96, 60); - foodSwitch[i].IsTapGestureFeedback = true; + foodSwitch[i].Feedback = true; parentView[2].Add(foodSwitch[i]); } for (i = 0; i < 4; i++) @@ -249,7 +249,7 @@ namespace Tizen.NUI.Samples kitchenSwitch[i] = new Switch(); kitchenSwitch[i].ApplyStyle(kitchenSt); kitchenSwitch[i].Size = new Size(96, 60); - kitchenSwitch[i].IsTapGestureFeedback = true; + kitchenSwitch[i].Feedback = true; parentView[2].Add(kitchenSwitch[i]); } @@ -259,7 +259,7 @@ namespace Tizen.NUI.Samples utilitySwitch2[i] = new Switch(); utilitySwitch2[i].ApplyStyle(utilitySt); utilitySwitch2[i].Size = new Size(96, 60); - utilitySwitch2[i].IsTapGestureFeedback = true; + utilitySwitch2[i].Feedback = true; parentView[2].Add(utilitySwitch2[i]); } for (i = 0; i < 4; i++) @@ -267,7 +267,7 @@ namespace Tizen.NUI.Samples familySwitch2[i] = new Switch(); familySwitch2[i].ApplyStyle(familySt); familySwitch2[i].Size = new Size(96, 60); - familySwitch2[i].IsTapGestureFeedback = true; + familySwitch2[i].Feedback = true; parentView[2].Add(familySwitch2[i]); } for (i = 0; i < 4; i++) @@ -275,7 +275,7 @@ namespace Tizen.NUI.Samples foodSwitch2[i] = new Switch(); foodSwitch2[i].ApplyStyle(foodSt); foodSwitch2[i].Size = new Size(96, 60); - foodSwitch2[i].IsTapGestureFeedback = true; + foodSwitch2[i].Feedback = true; parentView[2].Add(foodSwitch2[i]); } for (i = 0; i < 4; i++) @@ -283,7 +283,7 @@ namespace Tizen.NUI.Samples kitchenSwitch2[i] = new Switch(); kitchenSwitch2[i].ApplyStyle(kitchenSt); kitchenSwitch2[i].Size = new Size(96, 60); - kitchenSwitch2[i].IsTapGestureFeedback = true; + kitchenSwitch2[i].Feedback = true; parentView[2].Add(kitchenSwitch2[i]); } -- 2.7.4