Search in sources :

Example 81 with DialogFragment

use of android.support.v4.app.DialogFragment in project Shuttle by timusus.

the class VideoCastControllerActivity method showTracksChooserDialog.

private void showTracksChooserDialog() throws TransientNetworkDisconnectionException, NoConnectionException {
    FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
    Fragment prev = getSupportFragmentManager().findFragmentByTag(DIALOG_TAG);
    if (prev != null) {
        transaction.remove(prev);
    }
    transaction.addToBackStack(null);
    // Create and show the dialog.
    TracksChooserDialog dialogFragment = TracksChooserDialog.newInstance(mCastManager.getRemoteMediaInformation());
    dialogFragment.show(transaction, DIALOG_TAG);
}
Also used : FragmentTransaction(android.support.v4.app.FragmentTransaction) TracksChooserDialog(com.google.android.libraries.cast.companionlibrary.cast.tracks.ui.TracksChooserDialog) Fragment(android.support.v4.app.Fragment)

Example 82 with DialogFragment

use of android.support.v4.app.DialogFragment in project ActionBarSherlock by JakeWharton.

the class FragmentAlertDialogSupport method showDialog.

void showDialog() {
    DialogFragment newFragment = MyAlertDialogFragment.newInstance(R.string.alert_dialog_two_buttons_title);
    newFragment.show(getSupportFragmentManager(), "dialog");
}
Also used : SherlockDialogFragment(com.actionbarsherlock.app.SherlockDialogFragment) DialogFragment(android.support.v4.app.DialogFragment)

Example 83 with DialogFragment

use of android.support.v4.app.DialogFragment in project ActionBarSherlock by JakeWharton.

the class FragmentDialogOrActivitySupport method showDialog.

void showDialog() {
    // Create the fragment and show it as a dialog.
    DialogFragment newFragment = MyDialogFragment.newInstance();
    newFragment.show(getSupportFragmentManager(), "dialog");
}
Also used : SherlockDialogFragment(com.actionbarsherlock.app.SherlockDialogFragment) DialogFragment(android.support.v4.app.DialogFragment)

Example 84 with DialogFragment

use of android.support.v4.app.DialogFragment in project ActionBarSherlock by JakeWharton.

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 85 with DialogFragment

use of android.support.v4.app.DialogFragment in project Android-DialogFragments by wada811.

the class LoaderSpinnerProgressDialogFragmentExamplesFragment method onLoaderReset.

@Override
public void onLoaderReset(Loader<Object> objectLoader) {
    Log.i(TAG, "onLoaderReset");
    getLoaderManager().destroyLoader(objectLoader.getId());
    Fragment fragment = getChildFragmentManager().findFragmentByTag(ProgressDialogFragment.TAG);
    if (fragment != null) {
        ProgressDialogFragment dialogFragment = (ProgressDialogFragment) fragment;
        dialogFragment.dismissAllowingStateLoss();
    }
}
Also used : ProgressDialogFragment(com.wada811.android.dialogfragments.material.ProgressDialogFragment) ProgressDialogFragment(com.wada811.android.dialogfragments.material.ProgressDialogFragment) Fragment(android.support.v4.app.Fragment) ListFragment(android.support.v4.app.ListFragment)

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