admobadapter/src/main/java/com/clockbyte/admobadapter/expressads/AdViewWrappingStrategy.java
@Override
    protected void recycleAdViewWrapper(@NonNull ViewGroup wrapper, @NonNull NativeExpressAdView ad) {
        for (int i = 0; i < wrapper.getChildCount(); i++) {
            View v = wrapper.getChildAt(i);
            if (v instanceof NativeExpressAdView) {
                wrapper.removeViewAt(i);
                break;
            }
        }
    }
@Override
    protected void recycleAdViewWrapper(@NonNull ViewGroup wrapper, @NonNull NativeExpressAdView ad) {
        for (int i = 0; i < wrapper.getChildCount(); i++) {
            View v = wrapper.getChildAt(i);
            if (v instanceof NativeExpressAdView) {
                wrapper.removeViewAt(i);
                break;
            }
        }
    }
@ Override protected void recycleAdViewWrapper ( @ NonNull ViewGroup wrapper , @ NonNull NativeExpressAdView ad ) { for ( int i = 0 ; i < wrapper . getChildCount ( ) ; i ++ ) { View v = wrapper . getChildAt ( i ) ; if ( v instanceof NativeExpressAdView ) { wrapper . removeViewAt ( i ) ; break ; } } }
This method can be overriden to recycle (remove) {@param ad} from {@param wrapper} view before adding to wrap.
By default it will look for {@param ad} in the direct children of {@param wrapper} and remove the first occurence.
See the super's implementation for instance.
The NativeExpressHolder recycled by the RecyclerView may be a different
instance than the one used previously for this position. Clear the
wrapper of any subviews in case it has a different
AdView associated with it
This method can be overriden to recycle ( remove ) {