Example usage for android.app DialogFragment show

List of usage examples for android.app DialogFragment show

Introduction

In this page you can find the example usage for android.app DialogFragment show.

Prototype

public int show(FragmentTransaction transaction, String tag) 

Source Link

Document

Display the dialog, adding the fragment using an existing transaction and then committing the transaction.

Usage

From source file:cn.org.eshow.framwork.util.AbDialogUtil.java

/**
 * ???.// w w  w. j  a  v  a2  s.c om
 * @param context
  * @param fragment
 */
public static void showDialog(Context context, DialogFragment fragment) {
    FragmentActivity activity = (FragmentActivity) context;
    fragment.show(activity.getFragmentManager(), dialogTag);
}

From source file:com.antew.redditinpictures.ui.RedditFragmentActivityFree.java

@Override
public void handleLoginAndLogout() {
    DialogFragment upgrade = UpdateToFullVersionDialogFragment.newInstance();
    upgrade.show(getFragmentManager(), ConstsFree.DIALOG_UPGRADE);
}

From source file:edu.asu.msse.gnayak2.movieapplication.NewMovieHandler.java

public void showDatePickerDialog(View v) {
    DialogFragment newFragment = new DatePickerFragment();
    newFragment.show(getFragmentManager(), "datePicker");
}

From source file:org.jmpm.ethbadge.MainActivity.java

@Override
public void onDialogPasswordOk(String password) {
    try {/* w  w w  .  j av a 2 s.  co m*/
        GlobalAppSettings.getInstance().setPassword(password);
        GlobalAppSettings.getInstance().loadSettings();
        if (GlobalAppSettings.getInstance().wasPasswordCorrect()) {
            startActivity(intentToGo);
        } else {
            Toast.makeText(getApplicationContext(), "Wrong password. Please try again", Toast.LENGTH_SHORT)
                    .show();
            DialogFragment dialog = new DialogPassword();
            dialog.show(getFragmentManager(), "DialogPassword");
        }
    } catch (Exception e) {
        Utils.sendFeedbackEmail(getApplicationContext(), (Exception) e);
        Toast.makeText(getApplicationContext(), "Oops... An error happened", Toast.LENGTH_LONG).show();
    }
}

From source file:de.uulm.graphicalpasswords.openpassgo.PassGoCreatePasswordActivity.java

public void clearAll(View view) {
    DialogFragment dialog = new DeletePatternDialogFragment();
    dialog.show(getFragmentManager(), "delete");
}

From source file:at.bitfire.davdroid.mirakel.syncadapter.EnterCredentialsFragment.java

void queryServer() {
    FragmentTransaction ft = getFragmentManager().beginTransaction();

    Bundle args = new Bundle();

    String host_path = editBaseURL.getText().toString();
    args.putString(QueryServerDialogFragment.EXTRA_BASE_URL, URIUtils.sanitize(protocol + host_path));
    args.putString(QueryServerDialogFragment.EXTRA_USER_NAME, editUserName.getText().toString());
    args.putString(QueryServerDialogFragment.EXTRA_PASSWORD, editPassword.getText().toString());
    args.putBoolean(QueryServerDialogFragment.EXTRA_AUTH_PREEMPTIVE, checkboxPreemptive.isChecked());

    DialogFragment dialog = new QueryServerDialogFragment();
    dialog.setArguments(args);//  w  w  w  . j  ava  2s .  c o m
    dialog.show(ft, QueryServerDialogFragment.class.getName());
}

From source file:org.mariotaku.twidere.util.SaveFileTask.java

@Override
protected void onPreExecute() {
    final DialogFragment fragment = new ProgressDialogFragment();
    fragment.setCancelable(false);/* w  w  w .  java2s .  co  m*/
    fragment.show(activity.getFragmentManager(), PROGRESS_FRAGMENT_TAG);
    super.onPreExecute();
}

From source file:at.bitfire.davdroid.mirakel.syncadapter.LoginURLFragment.java

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
    case R.id.next:
        FragmentTransaction ft = getFragmentManager().beginTransaction();

        Bundle args = new Bundle();
        String host_path = editBaseURI.getText().toString();
        args.putString(QueryServerDialogFragment.EXTRA_BASE_URI, URLUtils.sanitize(scheme + host_path));
        args.putString(QueryServerDialogFragment.EXTRA_USER_NAME, editUserName.getText().toString());
        args.putString(QueryServerDialogFragment.EXTRA_PASSWORD, editPassword.getText().toString());
        args.putBoolean(QueryServerDialogFragment.EXTRA_AUTH_PREEMPTIVE, checkboxPreemptive.isChecked());

        DialogFragment dialog = new QueryServerDialogFragment();
        dialog.setArguments(args);//w  ww.jav  a2  s .c om
        dialog.show(ft, QueryServerDialogFragment.class.getName());
        break;
    default:
        return false;
    }
    return true;
}

From source file:de.uulm.graphicalpasswords.openpassgo.PassGoCreatePasswordActivity.java

public void submit(View view) {
    SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
    SharedPreferences.Editor edit = sharedPref.edit();
    edit.putString("passgo_pw", patternView.getInput().toString());
    edit.commit();/* w w w  . j a  va2s .  c  o m*/

    DialogFragment dialog = new RememberPasswordDialogFragment();
    dialog.show(getFragmentManager(), "remember");
}

From source file:org.exfio.csyncdroid.syncadapter.ExfioPeerEnterCredentialsFragment.java

void queryServer() {
    FragmentTransaction ft = getFragmentManager().beginTransaction();

    Bundle args = new Bundle();

    args.putString(android.accounts.AccountManager.KEY_ACCOUNT_TYPE, Constants.ACCOUNT_TYPE_EXFIOPEER);
    args.putString(ExfioPeerAccountSettings.KEY_BASE_URL,
            URIUtils.sanitize(protocol + editBaseURL.getText().toString()));
    args.putString(ExfioPeerAccountSettings.KEY_USERNAME, editUserName.getText().toString());
    args.putString(ExfioPeerAccountSettings.KEY_PASSWORD, editPassword.getText().toString());
    args.putBoolean(ExfioPeerAccountSettings.KEY_AUTH_PREEMPTIVE, true);

    DialogFragment dialog = new QueryServerDialogFragment();
    dialog.setArguments(args);/* ww  w.  jav a2s . c o m*/
    dialog.show(ft, QueryServerDialogFragment.class.getName());
}