Search in sources :

Example 46 with DialogFragment

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

the class LoaderSpinnerProgressDialogFragmentExamplesFragment method onLoadFinished.

@Override
public void onLoadFinished(Loader<Object> objectLoader, Object o) {
    Log.i(TAG, "onLoadFinished");
    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.traditional.ProgressDialogFragment) Fragment(android.support.v4.app.Fragment) ListFragment(android.support.v4.app.ListFragment) ProgressDialogFragment(com.wada811.android.dialogfragments.traditional.ProgressDialogFragment)

Example 47 with DialogFragment

use of android.support.v4.app.DialogFragment in project wire-android by wireapp.

the class ZetaPreferencesActivity method onPreferenceDisplayDialog.

@Override
public boolean onPreferenceDisplayDialog(PreferenceFragmentCompat preferenceFragmentCompat, Preference preference) {
    final String key = preference.getKey();
    final DialogFragment f;
    if (preference.getKey().equals(getString(R.string.pref_options_ringtones_ping_key)) || preference.getKey().equals(getString(R.string.pref_options_ringtones_text_key)) || preference.getKey().equals(getString(R.string.pref_options_ringtones_ringtone_key))) {
        final int defaultId = preference.getExtras().getInt(WireRingtonePreferenceDialogFragment.EXTRA_DEFAULT);
        f = WireRingtonePreferenceDialogFragment.newInstance(key, defaultId);
    } else {
        return false;
    }
    f.setTargetFragment(preferenceFragmentCompat, 0);
    f.show(getSupportFragmentManager(), key);
    return true;
}
Also used : WireRingtonePreferenceDialogFragment(com.waz.zclient.pages.main.profile.preferences.dialogs.WireRingtonePreferenceDialogFragment) DialogFragment(android.support.v4.app.DialogFragment)

Example 48 with DialogFragment

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

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

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

the class ChromecastFragment method showTracksChooserDialog.

private void showTracksChooserDialog() throws TransientNetworkDisconnectionException, NoConnectionException {
    FragmentTransaction transaction = getFragmentManager().beginTransaction();
    Fragment prev = getFragmentManager().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) BaseFragment(com.zype.android.ui.base.BaseFragment) Fragment(android.support.v4.app.Fragment)

Example 50 with DialogFragment

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

the class BackupWalletDialogFragment method show.

public static void show(final FragmentManager fm) {
    final DialogFragment newFragment = new BackupWalletDialogFragment();
    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