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