recycleadapter/src/main/java/com/kevadiyakrunalk/recycleadapter/composedadapter/ComposedAdapter.java
public ComposedChildAdapterTag addAdapter(@NonNull RecyclerView.Adapter adapter, int position) {
        if (hasObservers() && hasStableIds()) {
            if (!adapter.hasStableIds()) {
                throw new IllegalStateException("Wrapped child adapter must has stable IDs");
            }
        }

        final ComposedChildAdapterTag tag = mAdaptersSet.addAdapter(adapter, position);
        final int segment = mAdaptersSet.getAdapterSegment(tag);

        mSegmentedPositionTranslator.invalidateSegment(segment);

        // NOTE: Need to assume as data set change here because view types and item IDs are completely changed!
        notifyDataSetChanged();

        return tag;
    }
/**
     * Adda child adapter to the specified position.
     *
     * @param adapter  The adapter which to be managed by the ComposedAdapter
     * @param position The position inserting a child adapter
     * @return An instance of {@link ComposedChildAdapterTag}
     * @see {@link #addAdapter(RecyclerView.Adapter)}
     */
Adda child adapter to the specified position.
@param adapter  The adapter which to be managed by the ComposedAdapter
@param position The position inserting a child adapter
@return An instance of  ComposedChildAdapterTag
@see  #addAdapter(RecyclerView.Adapter)
Adda child adapter to the specified position . @param adapter The adapter which to be managed by the ComposedAdapter @param position The position inserting a child adapter @return An instance of ComposedChildAdapterTag @see #addAdapter ( RecyclerView . Adapter )
public ComposedChildAdapterTag addAdapter(@NonNull RecyclerView.Adapter adapter, int position) {
        if (hasObservers() && hasStableIds()) {
            if (!adapter.hasStableIds()) {
                throw new IllegalStateException("Wrapped child adapter must has stable IDs");
            }
        }
        final ComposedChildAdapterTag tag = mAdaptersSet.addAdapter(adapter, position);
        final int segment = mAdaptersSet.getAdapterSegment(tag);
        mSegmentedPositionTranslator.invalidateSegment(segment);
        notifyDataSetChanged();
        return tag;
    }
public ComposedChildAdapterTag addAdapter ( @ NonNull RecyclerView . Adapter adapter , int position ) { if ( hasObservers ( ) && hasStableIds ( ) ) { if ( ! adapter . hasStableIds ( ) ) { throw new IllegalStateException ( "Wrapped child adapter must has stable IDs" ) ; } } final ComposedChildAdapterTag tag = mAdaptersSet . addAdapter ( adapter , position ) ; final int segment = mAdaptersSet . getAdapterSegment ( tag ) ; mSegmentedPositionTranslator . invalidateSegment ( segment ) ; notifyDataSetChanged ( ) ; return tag ; }
Adda child adapter to the specified position.
Adda child adapter to the specified position .
// NOTE: Need to assume as data set change here because view types and item IDs are completely changed!