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);
}
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);
}
Aggregations