Fragment onDestroy - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Fragment onDestroy method.

This code example shows how to use the following methods:getActivity, onDestroy
                              Context.BIND_AUTO_CREATE);
  } 
 
  @Override 
  public void onDestroy() { 
    getActivity().getApplicationContext().unbindService(this);
    disconnect(); 
 
    super.onDestroy(); 
  } 
 
  @Override 
  public void onClick(View view) {
    EditText script=(EditText)getView().findViewById(R.id.script);
    String src=script.getText().toString();
 
    service.executeScript(src);
  } 
 
  @Override 
7
CodeRank
This code example shows how to use the following methods:getActivity, onDestroy
    mLocalActivityManager.dispatchStop();
  } 
 
  @Override 
  public void onDestroy() { 
    super.onDestroy(); 
    if (DEBUG)
      Log.d(TAG, "onDestroy(): " + getClass().getSimpleName());
    mLocalActivityManager.dispatchDestroy(getActivity().isFinishing());
  } 
} 
6
CodeRank
This code example shows how to use the following methods:onDestroy
		paused = true;
	} 
 
	@Override 
	public void onDestroy() { 
		super.onDestroy(); 
		destroyed = true;
	} 
 
} 
6
CodeRank
This code example shows how to use the following methods:onDestroy
        } 
    } 
 
    @Override 
    public void onDestroy() { 
        super.onDestroy(); 
        if (mImageView != null) {
            // Cancel any pending image work 
            ImageWorker.cancelWork(mImageView);
            mImageView.setImageDrawable(null);
        } 
    } 
} 
6
CodeRank
This code example shows how to use the following methods:onDestroy
            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);
6
CodeRank
This code example shows how to use the following methods:onDestroy
    public void onDestroy() { 
        if (mWebView != null) {
            mWebView.destroy();
            mWebView = null;
        } 
        super.onDestroy(); 
    } 
 
    /** 
     * Gets the WebView. 
     */ 
    public WebView getWebView() {
        return mIsWebViewAvailable ? mWebView : null;
    } 
} 
5
CodeRank
This code example shows how to use the following methods:onDestroy
	@SuppressWarnings("deprecation") 
	@Override 
	public void onDestroy() { 
		if(DEBUG) Log.d(TAG, ".onDestroy()...");
		mLocalActivityManager.destroyActivity("mapActivity", true);
		super.onDestroy(); 
	} 
	 
	@Override 
	public void onDetach() { 
		if(DEBUG) Log.d(TAG, ".onDetach()...");
		super.onDetach(); 
	} 
	 
	/* 
	 * METHODS 
	 */ 
	 
	public View getFragmentLayout() {
		return mFragmentLinearLayout;
5
CodeRank
This code example shows how to use the following methods:onDestroy
        sessionTracker.getSession().onActivityResult(this.getActivity(), requestCode, resultCode, data); 
    } 
 
    @Override 
    public void onDestroy() { 
        super.onDestroy(); 
        sessionTracker.stopTracking(); 
    } 
 
    /** 
     * Use the supplied Session object instead of the active Session. 
     * 
     * @param newSession the Session object to use 
     */ 
    public void setSession(Session newSession) { 
        if (sessionTracker != null) { 
            sessionTracker.setSession(newSession); 
        } 
    } 
 
5
CodeRank
This code example shows how to use the following methods:onDestroy
        } 
    } 
 
    @Override 
    public void onDestroy() { 
        super.onDestroy(); 
        if (biller != null) {
            biller.onDestroy();
        } 
    } 
 
    private String getAboutText() {
        try { 
            InputStream raw = getResources().openRawResource(R.raw.about);
            return IOUtils.toString(raw, Charset.forName("UTF-8"));
        } catch (IOException e) {
            return ""; 
        } 
    } 
 
5
CodeRank
This code example shows how to use the following methods:onDestroy
        super.onPause(); 
    } 
 
    @Override 
    public void onDestroy() { 
        super.onDestroy(); 
    } 
} 
 
4
CodeRank
onDestroy Method Overview
Called when the fragment is no longer in use.
See Code Examples for other Android Fragment Methods: