public void replace ( BaseCell oldOne , BaseCell newOne ) { VirtualLayoutManager layoutManager = getLayoutManager ( ) ; if ( oldOne != null && newOne != null && mGroupBasicAdapter != null && layoutManager != null ) { int replacePosition = mGroupBasicAdapter . getPositionByItem ( oldOne ) ; if ( replacePosition >= 0 ) { int cardIdx = mGroupBasicAdapter . findCardIdxFor ( replacePosition ) ; Card card = mGroupBasicAdapter . getCardRange ( cardIdx ) . second ; card . replaceCell ( oldOne , newOne ) ; mGroupBasicAdapter . replaceComponent ( Arrays . asList ( oldOne ) , Arrays . asList ( newOne ) ) ; } } }
Replace cell one by one .