Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-89120

Act the touch and pen at the same time , a lot of touch event will filter out

    XMLWordPrintable

Details

    • Android

    Description

      Hardware: Promethean ActivPanel AP7-B86
      Runtime Enviroment: ChromeBook Or ChromeBox
      Act the touch and pen at the same time , a lot of touch event will filter out. At that time , getAction will always return 2.

       static private int getAction(int index, MotionEvent event)
          {
              int action = event.getActionMasked();
              if (action == MotionEvent.ACTION_MOVE) {
                  int hsz = event.getHistorySize();
                  if (hsz > 0) {
                      float x = event.getX(index);
                      float y = event.getY(index);
                      for (int h = 0; h < hsz; ++h) {
                          if ( event.getHistoricalX(index, h) != x ||
                               event.getHistoricalY(index, h) != y )
                              return 1;
                      }
                      return 2;
                  }
                  return 1;
              }
              if (action == MotionEvent.ACTION_DOWN || action == MotionEvent.ACTION_POINTER_DOWN && index == event.getActionIndex()) {
                  return 0;
              } else if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_POINTER_UP && index == event.getActionIndex()) {
                  return 3;
              }
              return 2;
          }
      

      Attachments

        1. fingerpaint.rar
          14 kB
        2. TestVideo.mp4
          1.80 MB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              axelspoerl Axel Spoerl
              alex-m Alex Mao
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes