コード例 #1
0
        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;
            }
            }
        }
コード例 #2
0
 private void Detector_Detected(object source, LongPressGestureDetector.DetectedEventArgs e)
 {
     if (GetCurrentMode() == Mode.NormalMode)
     {
         SetEditMode();
     }
 }
コード例 #3
0
        private void OnDetected(object obj, LongPressGestureDetector.DetectedEventArgs e)
        {
            View v1 = e.View;

            e.View = v1;

            LongPressGesture p1 = e.LongPressGesture;

            e.LongPressGesture = p1;
        }
コード例 #4
0
        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);
            }
        }
コード例 #5
0
        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");
        }
コード例 #6
0
 public virtual void OnLongPress(object sender, LongPressGestureDetector.DetectedEventArgs e, object userData)
 {
 }
コード例 #7
0
 private void InternalOnLongPress(object sender, LongPressGestureDetector.DetectedEventArgs e)
 {
     mListener.OnLongPress(sender, e, mUserData);
     mLongGestureDetector.Detected -= InternalOnLongPress;
 }
コード例 #8
0
 private void OnDetected(object obj, LongPressGestureDetector.DetectedEventArgs e)
 {
 }
コード例 #9
0
 public override void OnLongPress(object sender, LongPressGestureDetector.DetectedEventArgs e, object userData)
 {
     Tizen.Log.Error("NUI", $"OnLongPress \n");
 }