DialogFragment getDialog - top ranked examples from Open Source projects

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

This code example shows how to use the following methods:getDialog, setCancelable, show
        assertTrue(shadowOf(dialog).isCancelable());
    } 
 
    @Test 
    public void shouldSetNotCancelableOnDialogBeforeShow() throws Exception { 
        DialogFragment dialogFragment = new DialogFragment();
        dialogFragment.setCancelable(false);
        dialogFragment.show(fragmentManager, "TAG");
 
        Dialog dialog = dialogFragment.getDialog();
 
        assertFalse(shadowOf(dialog).isCancelable());
    } 
 
    @Test 
    public void shouldSetNotCancelableOnDialogAfterShow() throws Exception { 
        DialogFragment dialogFragment = new DialogFragment();
        dialogFragment.show(fragmentManager, "TAG");
        dialogFragment.setCancelable(false);
 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getDialog, onDestroyView, getRetainInstance
	 
	@Override 
	public void onDestroyView() 
	{ 
		// http://code.google.com/p/android/issues/detail?id=17423 
		if(getDialog() != null && getRetainInstance()) getDialog().setDismissMessage(null);
		super.onDestroyView(); 
	} 
	 
	 
	@Override 
	public Dialog onCreateDialog(Bundle savedInstanceState)
	{ 
		ContextThemeWrapper context = new ContextThemeWrapper(getActivity(), com.actionbarsherlock.R.style.Theme_Sherlock_Light_Dialog);
		ProgressDialog dialog = new ProgressDialog(context);
		dialog.setMessage("progress");
		dialog.setIndeterminate(true);
		dialog.setCancelable(false);
		return dialog;
	} 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getDialog, onDestroyView, getRetainInstance
 
	// This is to work around what is apparently a bug. If you don't have it 
	// here the dialog will be dismissed on rotation, so tell it not to dismiss. 
	@Override 
	public void onDestroyView() { 
		if (getDialog() != null && getRetainInstance()) {
			getDialog().setDismissMessage(null);
		} 
		 
		super.onDestroyView(); 
	} 
 
	// Also when we are dismissed we need to cancel the task. 
	@Override 
	public void onDismiss(DialogInterface dialog) {
		super.onDismiss(dialog);
		 
		if (mTask != null) {
			mTask.cancel(false);
			 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getDialog
  public Listener getListener() { 
    return listener;
  } 
 
  public boolean isShowing() { 
    final Dialog dialog = getDialog();
    return dialog != null && dialog.isShowing();
  } 
 
  @Override 
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setRetainInstance(true);
  } 
 
  protected boolean isListenerOptional() { 
    return true; 
  } 
 
  @SuppressWarnings("unchecked") 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getDialog, getShowsDialog
        } 
 
        @Override 
        public void onPageFinished(WebView view, String url) {
            super.onPageFinished(view, url);
            if (getShowsDialog() && getDialog() != null && view != null)
                getDialog().setTitle(view.getTitle());
            else if (mTitle != null && view != null)
                mTitle.setText(view.getTitle());
            view.setEnabled(true);
        } 
    } 
 
    @Override 
    public void onClick(View v) {
        switch (v.getId()) {
            case android.R.id.button1:
                if (!getShowsDialog() && getActivity() instanceof OpenExplorer)
                    ((OpenExplorer)getActivity()).findViewById(R.id.frag_log).setVisibility(
                            View.GONE);
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getDialog, onDestroyView, getRetainInstance, getView
	} 
 
	@Override 
	public void onDestroyView() 
	{ 
		if (getDialog() != null && getRetainInstance())
			getDialog().setDismissMessage(null);
		super.onDestroyView(); 
		((ViewGroup)getView()).removeView(root);
	} 
 
	@SuppressLint("SetJavaScriptEnabled") 
	private void initWebView(WebView view, View loadingLayout, Bundle savedInstanceState)
	{ 
		view.getSettings().setJavaScriptEnabled(true);
		view.setWebViewClient(new LoginWebClient(loadingLayout, this, (OnLoginResponseListener) getActivity()));
 
		if (savedInstanceState == null)
			view.loadUrl(InstagramConstants.getOauthURL());
		else 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getDialog, getActivity
		return builder.create();
	} 
	 
	private void startConnection(String username) {
		if(username.length() > 0) {
			SharedPreferences prefs = getActivity().getSharedPreferences("settings", Context.MODE_PRIVATE);
			Editor edit = prefs.edit();
			edit.putString(PREF_PLAYERNAME, username);
			edit.commit();
			 
			Netplay.getAppInstance(getActivity().getApplicationContext()).connectToDefaultServer(username);
			getDialog().dismiss();
			((MainActivity)getActivity()).onNetConnectingStarted();
		} 
	} 
} 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getDialog, onStart
		return builder.create();
	} 
 
	@Override 
	public void onStart() { 
		super.onStart(); 
		((TextView) this.getDialog().findViewById(android.R.id.message)).setMovementMethod(LinkMovementMethod.getInstance());
	} 
 
	 
} 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getDialog, onDestroyView, getRetainInstance
		return dialog;
	} 
 
	@Override 
	public void onDestroyView() { 
		if (getDialog() != null && getRetainInstance()) {
			getDialog().setDismissMessage(null);
		} 
		super.onDestroyView(); 
	} 
 
} 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getDialog
        return alertdialog;
    } 
 
    public void onTextChanged(CharSequence charsequence, int i, int j, int k)
    { 
        AlertDialog alertdialog = (AlertDialog)getDialog();
        if(alertdialog != null)
        { 
            Button button = alertdialog.getButton(-1);
            boolean flag;
            if(charsequence.toString().trim().length() > 0)
                flag = true;
            else 
                flag = false;
            button.setEnabled(flag);
        } 
    } 
 
} 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java

Related DialogFragment getDialog Questions & Answers:

getDialog Method Overview
See Code Examples for other Android DialogFragment Methods: