Code example for Fragment

Methods: onDestroy

0
            return v;
        } 
 
        @Override 
        public void onDestroy() { 
            super.onDestroy(); 
            mAdView.destroy();
        } 
 
        // Receives callbacks on various events related to fetching ads.  In this sample, 
        // the application displays a message on the screen.  A real application may, 
        // for example, fill the ad with a banner promoting a feature. 
        private class MyAdListener implements AdListener { 
 
            @Override 
            public void onDismissScreen(Ad ad) {}
 
            @Override 
            public void onFailedToReceiveAd(Ad ad, ErrorCode errorCode) {
                mAdStatus.setText(R.string.error_receive_ad);
            }