Search in sources :

Example 36 with DialogFragment

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");
    }
}
Also used : FragmentManager(android.app.FragmentManager) FragmentTransaction(android.app.FragmentTransaction) CroutonFragment(it.gmariotti.cardslib.demo.extras.fragment.CroutonFragment) UniversalImageLoaderFragment(it.gmariotti.cardslib.demo.extras.fragment.UniversalImageLoaderFragment) ListViewAnimationsFragment(it.gmariotti.cardslib.demo.extras.fragment.ListViewAnimationsFragment) DragDropListFragment(it.gmariotti.cardslib.demo.extras.fragment.DragDropListFragment) StickyListHeadersFragment(it.gmariotti.cardslib.demo.extras.fragment.StickyListHeadersFragment) ListViewGridAnimationsFragment(it.gmariotti.cardslib.demo.extras.fragment.ListViewGridAnimationsFragment) DialogFragment(android.app.DialogFragment) Fragment(android.app.Fragment) PicassoFragment(it.gmariotti.cardslib.demo.extras.fragment.PicassoFragment) BaseStaggeredGridFragment(it.gmariotti.cardslib.demo.extras.fragment.BaseStaggeredGridFragment) ExpandPicassoFragment(it.gmariotti.cardslib.demo.extras.fragment.ExpandPicassoFragment) GoogleProgressFragment(it.gmariotti.cardslib.demo.extras.fragment.nativeview.GoogleProgressFragment) CardWithListFragment(it.gmariotti.cardslib.demo.extras.fragment.CardWithListFragment) AnimateStaggeredGridFragment(it.gmariotti.cardslib.demo.extras.fragment.AnimateStaggeredGridFragment) IonFragment(it.gmariotti.cardslib.demo.extras.fragment.IonFragment) TwoWayViewFragment(it.gmariotti.cardslib.demo.extras.fragment.TwoWayViewFragment) ActionbarpullFragment(it.gmariotti.cardslib.demo.extras.fragment.ActionbarpullFragment) BaseFragment(it.gmariotti.cardslib.demo.extras.fragment.BaseFragment) StaggeredGridFragment(it.gmariotti.cardslib.demo.extras.fragment.StaggeredGridFragment)

Example 37 with DialogFragment

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();
    }
}
Also used : FragmentManager(android.app.FragmentManager) DialogFragment(android.app.DialogFragment)

Example 38 with DialogFragment

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);
}
Also used : FragmentManager(android.app.FragmentManager) FragmentTransaction(android.app.FragmentTransaction) DialogFragment(android.app.DialogFragment)

Example 39 with DialogFragment

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());
    }
}
Also used : AndroidAuthSession(com.dropbox.client2.android.AndroidAuthSession) BackupAccountsDialogFragment(com.decad3nce.aegis.Fragments.BackupAccountsDialogFragment) DialogFragment(android.app.DialogFragment) BackupAccountsDialogFragment(com.decad3nce.aegis.Fragments.BackupAccountsDialogFragment) Intent(android.content.Intent) IOException(java.io.IOException) FileNotFoundException(java.io.FileNotFoundException) DropboxUnlinkedException(com.dropbox.client2.exception.DropboxUnlinkedException) DropboxException(com.dropbox.client2.exception.DropboxException)

Example 40 with DialogFragment

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;
    }
}
Also used : DialogFragment(android.app.DialogFragment)

Aggregations

DialogFragment (android.app.DialogFragment)48 Fragment (android.app.Fragment)10 FragmentManager (android.app.FragmentManager)7 FragmentTransaction (android.app.FragmentTransaction)7 ConfirmationDialogFragment (com.fsck.k9.fragment.ConfirmationDialogFragment)3 Intent (android.content.Intent)2 Bundle (android.os.Bundle)2 View (android.view.View)2 TextView (android.widget.TextView)2 GPSAlertDialogFragment (com.agup.gps.fragments.GPSAlertDialogFragment)2 NetworkAlertDialogFragment (com.agup.gps.fragments.NetworkAlertDialogFragment)2 BackupAccountsDialogFragment (com.decad3nce.aegis.Fragments.BackupAccountsDialogFragment)2 ProgressDialogFragment (com.fsck.k9.fragment.ProgressDialogFragment)2 BaseFragment (it.gmariotti.cardslib.demo.fragment.BaseFragment)2 Activity (android.app.Activity)1 DevicePolicyManager (android.app.admin.DevicePolicyManager)1 BroadcastReceiver (android.content.BroadcastReceiver)1 ComponentName (android.content.ComponentName)1 Context (android.content.Context)1 IntentFilter (android.content.IntentFilter)1