@Override public PointerEventsConfig getPointerEventsConfigForView(View view) { PointerEvents pointerEvents; pointerEvents = view instanceof ReactPointerEventsView ? ((ReactPointerEventsView) view).getPointerEvents() : PointerEvents.AUTO; // Views that are disabled should never be the target of pointer events. However, their children // can be because some views (SwipeRefreshLayout) use enabled but still have children that can // be valid targets. if (!view.isEnabled()) { if (pointerEvents == PointerEvents.AUTO) { return PointerEventsConfig.BOX_NONE; } else if (pointerEvents == PointerEvents.BOX_ONLY) { return PointerEventsConfig.NONE; } } switch (pointerEvents) { case BOX_ONLY: return PointerEventsConfig.BOX_ONLY; case BOX_NONE: return PointerEventsConfig.BOX_NONE; case NONE: return PointerEventsConfig.NONE; } return PointerEventsConfig.AUTO; }