Code example for RelativeLayout

Methods: removeAllViews

0
    public abstract View getInterstitialView(Context ctx);
 
    protected void removeViews() { 
        RelativeLayout parent = (RelativeLayout)this.getParent();
        if(parent != null) {
            (parent).removeAllViews();
        } 
    } 
 
    public void closeInterstitial() { 
        final AdInterstitialBaseView adView = this;
        handler.post(new Runnable() {
            @Override 
            public void run() { 
                if(callingActivityContext == null) {
                    // interstitial was never displayed; nothing to do here... 
                    return; 
                } 
                ((Activity)callingActivityContext).finish();
                if(interstitialListener != null) {
                    interstitialListener.didClose(adView);