Расширение TouchDelegate представления - PullRequest
0 голосов
/ 10 декабря 2018

У меня есть представление Android, TouchDelegate которого я хочу увеличить по ширине.

     private void expandDiscTouchArea() {
        ...

        discOsbParent.post(() -> {
          // Post in the parent's message queue to make sure the parent
          // lays out its children before we call getHitRect()
          Rect delegateArea = new Rect();
          discOsb.getHitRect(delegateArea);
          delegateArea.right += getResources().getDimensionPixelSize(R.dimen.disc_in_osb_extra_touch_area);
          TouchDelegate expandedArea = new TouchDelegate(delegateArea, discOsb);
          // give the delegate to an ancestor of the view we're delegating the area to
...
        });
      }

Я вижу, что есть только опция для изменения TouchArea right, но не end.

Можно ли вместо этого расширить область касания до end?

...