@NonNull protected ProteusView onUnknownViewEncountered(String type, Layout layout, ObjectValue data, int dataIndex) { if (ProteusConstants.isLoggingEnabled()) { Log.d(TAG, "No ViewTypeParser for: " + type); } if (context.getCallback() != null) { ProteusView view = context.getCallback().onUnknownViewType(context, type, layout, data, dataIndex); //noinspection ConstantConditions because we need to throw a ProteusInflateException specifically if (view == null) { throw new ProteusInflateException("inflater Callback#onUnknownViewType() must not return null"); } } throw new ProteusInflateException("Layout contains type: 'include' but inflater callback is null"); }
/** * @param event * @param value * @param view */ public void trigger(String event, Value value, ProteusView view) { ProteusLayoutInflater.Callback callback = view.getViewManager().getContext().getCallback(); if (null != callback) { callback.onEvent(event, value, view); } } }