use of android.app.DialogFragment in project cardslib by gabrielemariotti.
the class MainActivity method openDialogFragment.
private void openDialogFragment(DialogFragment dialogStandardFragment) {
if (dialogStandardFragment != null) {
FragmentManager fm = getFragmentManager();
FragmentTransaction ft = fm.beginTransaction();
Fragment prev = fm.findFragmentByTag("carddemo_dialog_extras");
if (prev != null) {
ft.remove(prev);
}
//ft.addToBackStack(null);
dialogStandardFragment.show(ft, "carddemo_dialog_extras");
}
}
use of android.app.DialogFragment in project AndroidChromium by JackyAndroid.
the class SyncCustomizationFragment method closeDialogIfOpen.
private void closeDialogIfOpen(String tag) {
FragmentManager manager = getFragmentManager();
if (manager == null) {
// Do nothing if the manager doesn't exist yet; see http://crbug.com/480544.
return;
}
DialogFragment df = (DialogFragment) manager.findFragmentByTag(tag);
if (df != null) {
df.dismiss();
}
}
use of android.app.DialogFragment in project NotificationPeekPort by lzanita09.
the class DialogHelper method showAboutDialog.
public static void showAboutDialog(Activity activity) {
FragmentManager fm = activity.getFragmentManager();
FragmentTransaction ft = fm.beginTransaction();
((DialogFragment) Fragment.instantiate(activity, AboutDialogFragment.class.getName())).show(ft, ABOUT_DIALOG_TAG);
}
use of android.app.DialogFragment in project Aegis by Decad3nce.
the class BackupDropboxAccountsActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.backup_layout);
progressBar = (ProgressBar) findViewById(R.id.progressBar);
progressBar.setVisibility(View.VISIBLE);
cr = getContentResolver();
context = this;
Intent intent;
AndroidAuthSession session = buildSession();
mDBApi = new DropboxAPI<AndroidAuthSession>(session);
try {
intent = getIntent();
if (intent.hasExtra("fromReceiver")) {
address = intent.getStringExtra("fromReceiver");
Log.i(TAG, "Backup intent from receiver");
recoverData();
} else {
Log.i(TAG, "Backup intent from elsewhere");
DialogFragment dialog = new BackupAccountsDialogFragment();
dialog.show(getFragmentManager(), "BackupAccountsDialogFragment");
}
} catch (Exception e) {
Log.e(TAG, e.toString());
}
}
use of android.app.DialogFragment in project android_packages_apps_DSPManager by CyanogenMod.
the class MyAdapter method onOptionsItemSelected.
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int choice = item.getItemId();
switch(choice) {
case R.id.help:
DialogFragment df = new HelpFragment();
df.setStyle(DialogFragment.STYLE_NO_TITLE, 0);
df.show(getFragmentManager(), "help");
return true;
default:
return false;
}
}
Aggregations