Search in sources :

Example 96 with DialogFragment

use of android.support.v4.app.DialogFragment in project httpclient by pixmob.

the class FragmentDialogSupport method showDialog.

void showDialog() {
    mStackLevel++;
    // DialogFragment.show() will take care of adding the fragment
    // in a transaction.  We also want to remove any currently showing
    // dialog, so make our own transaction and take care of that here.
    FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
    Fragment prev = getSupportFragmentManager().findFragmentByTag("dialog");
    if (prev != null) {
        ft.remove(prev);
    }
    ft.addToBackStack(null);
    // Create and show the dialog.
    DialogFragment newFragment = MyDialogFragment.newInstance(mStackLevel);
    newFragment.show(ft, "dialog");
}
Also used : FragmentTransaction(android.support.v4.app.FragmentTransaction) SherlockDialogFragment(com.actionbarsherlock.app.SherlockDialogFragment) DialogFragment(android.support.v4.app.DialogFragment) SherlockDialogFragment(com.actionbarsherlock.app.SherlockDialogFragment) Fragment(android.support.v4.app.Fragment) DialogFragment(android.support.v4.app.DialogFragment)

Example 97 with DialogFragment

use of android.support.v4.app.DialogFragment in project JustAndroid by chinaltz.

the class AbDialogUtil method showDialog.

/**
     * 显示一个隐藏的的对话框.
     *
     * @param context
     * @param fragment
     */
public static void showDialog(Context context, DialogFragment fragment) {
    FragmentActivity activity = (FragmentActivity) context;
    fragment.show(activity.getFragmentManager(), dialogTag);
}
Also used : FragmentActivity(android.support.v4.app.FragmentActivity)

Example 98 with DialogFragment

use of android.support.v4.app.DialogFragment in project httpclient by pixmob.

the class FragmentDialogOrActivitySupport method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    // Used for theme switching in samples
    setTheme(SampleList.THEME);
    super.onCreate(savedInstanceState);
    setContentView(R.layout.fragment_dialog_or_activity);
    if (savedInstanceState == null) {
        // First-time init; create fragment to embed in activity.
        FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
        DialogFragment newFragment = MyDialogFragment.newInstance();
        ft.add(R.id.embedded, newFragment);
        ft.commit();
    }
    // Watch for button clicks.
    Button button = (Button) findViewById(R.id.show_dialog);
    button.setOnClickListener(new OnClickListener() {

        public void onClick(View v) {
            showDialog();
        }
    });
}
Also used : FragmentTransaction(android.support.v4.app.FragmentTransaction) Button(android.widget.Button) SherlockDialogFragment(com.actionbarsherlock.app.SherlockDialogFragment) DialogFragment(android.support.v4.app.DialogFragment) OnClickListener(android.view.View.OnClickListener) TextView(android.widget.TextView) View(android.view.View)

Example 99 with DialogFragment

use of android.support.v4.app.DialogFragment in project bitcoin-wallet by bitcoin-wallet.

the class RestoreWalletFromExternalDialogFragment method show.

public static void show(final FragmentManager fm, final Uri backupUri) {
    final DialogFragment newFragment = new RestoreWalletFromExternalDialogFragment();
    final Bundle args = new Bundle();
    args.putParcelable(KEY_BACKUP_URI, backupUri);
    newFragment.setArguments(args);
    newFragment.show(fm, FRAGMENT_TAG);
}
Also used : Bundle(android.os.Bundle) DialogFragment(android.support.v4.app.DialogFragment)

Example 100 with DialogFragment

use of android.support.v4.app.DialogFragment in project bitcoin-wallet by bitcoin-wallet.

the class RaiseFeeDialogFragment method show.

public static void show(final FragmentManager fm, final Transaction tx) {
    final DialogFragment newFragment = instance(tx);
    newFragment.show(fm, FRAGMENT_TAG);
}
Also used : DialogFragment(android.support.v4.app.DialogFragment)

Aggregations

DialogFragment (android.support.v4.app.DialogFragment)85 Fragment (android.support.v4.app.Fragment)31 FragmentTransaction (android.support.v4.app.FragmentTransaction)24 Bundle (android.os.Bundle)10 FragmentManager (android.support.v4.app.FragmentManager)9 View (android.view.View)8 SherlockDialogFragment (com.actionbarsherlock.app.SherlockDialogFragment)8 TextView (android.widget.TextView)7 AlertDialog (android.app.AlertDialog)5 DialogInterface (android.content.DialogInterface)4 OnClickListener (android.content.DialogInterface.OnClickListener)4 Intent (android.content.Intent)4 ListFragment (android.support.v4.app.ListFragment)4 AppCompatDialogFragment (android.support.v7.app.AppCompatDialogFragment)4 OnClickListener (android.view.View.OnClickListener)4 Button (android.widget.Button)4 ItemPinnedMessageDialogFragment (com.h6ah4i.android.example.advrecyclerview.common.fragment.ItemPinnedMessageDialogFragment)4 ProgressDialogFragment (com.wada811.android.dialogfragments.material.ProgressDialogFragment)4 Dialog (android.app.Dialog)3 ProgressDialogFragment (com.wada811.android.dialogfragments.traditional.ProgressDialogFragment)3