Search in sources :

Example 91 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 92 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)

Aggregations

DialogFragment (android.support.v4.app.DialogFragment)73 Fragment (android.support.v4.app.Fragment)29 FragmentTransaction (android.support.v4.app.FragmentTransaction)21 FragmentManager (android.support.v4.app.FragmentManager)9 Bundle (android.os.Bundle)8 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