private void OnLongPressGestureDetected(object source, LongPressGestureDetector.DetectedEventArgs e) { switch (e.LongPressGesture.State) { case Gesture.StateType.Started: { Size windowSize = NUIApplication.GetDefaultWindow().Size; ItemRange range = new ItemRange(0, 0); mItemView.GetItemsRange(range); uint item = (e.LongPressGesture.ScreenPoint.Y < 0.5f * (float)windowSize.Height) ? range.begin : range.end; mItemView.ScrollToItem(item, SCROLL_TO_ITEM_ANIMATION_TIME); break; } case Gesture.StateType.Finished: { PropertyMap attributes = new PropertyMap(); mItemView.DoAction("stopScrolling", attributes); break; } default: { break; } } }
private void Detector_Detected(object source, LongPressGestureDetector.DetectedEventArgs e) { if (GetCurrentMode() == Mode.NormalMode) { SetEditMode(); } }
private void OnDetected(object obj, LongPressGestureDetector.DetectedEventArgs e) { View v1 = e.View; e.View = v1; LongPressGesture p1 = e.LongPressGesture; e.LongPressGesture = p1; }
private void OnLongPressGestureDetector(object source, LongPressGestureDetector.DetectedEventArgs e) { Tizen.Log.Debug("rkdehdrud", $"state is {e.LongPressGesture.State}"); StateType state = e.LongPressGesture.State; if (state == StateType.Started) { focusedView = e.View; e.View.BackgroundColor = Color.Red; Window.Instance.GetDefaultLayer().Add(e.View); } else if (state == StateType.Finished) { focusedView = null; e.View.BackgroundColor = Color.White; baseView.Add(e.View); } }
public void LongPressGestureDetectorDetected() { tlog.Debug(tag, $"LongPressGestureDetectorDetected START"); LongPressGestureDetector a1 = new LongPressGestureDetector(); a1.Detected += OnDetected; a1.Detected -= OnDetected; LongPressGestureDetector.DetectedEventArgs e = new LongPressGestureDetector.DetectedEventArgs(); object o = new object(); OnDetected(o, e); a1.Dispose(); tlog.Debug(tag, $"LongPressGestureDetectorDetected END (OK)"); Assert.Pass("LongPressGestureDetectorDetected"); }
public virtual void OnLongPress(object sender, LongPressGestureDetector.DetectedEventArgs e, object userData) { }
private void InternalOnLongPress(object sender, LongPressGestureDetector.DetectedEventArgs e) { mListener.OnLongPress(sender, e, mUserData); mLongGestureDetector.Detected -= InternalOnLongPress; }
private void OnDetected(object obj, LongPressGestureDetector.DetectedEventArgs e) { }
public override void OnLongPress(object sender, LongPressGestureDetector.DetectedEventArgs e, object userData) { Tizen.Log.Error("NUI", $"OnLongPress \n"); }