/** * A utility method to create a child data context, with its own scope and index from the data * of this data context. * * @param context The proteus context used to evaluate {@link FunctionBinding} to evaluate the scope. * @param scope The scope for the new data context * @param dataIndex The data index to used by the new data context. * @return A new data context with scope evaluated. */ public DataContext createChild(@NonNull ProteusContext context, @NonNull Map<String, Value> scope, int dataIndex) { return create(context, data, dataIndex, scope); }
@Override public void onBindViewHolder(ProteusViewHolder holder, int position) { DataContext context = DataContext.create(holder.context, data, position, scope); holder.view.getViewManager().update(context.getData()); }