Search in sources :

Example 61 with DialogFragment

use of androidx.fragment.app.DialogFragment in project Applozic-Android-SDK by AppLozic.

the class MainActivity method initiateChatClick.

public void initiateChatClick(View v) {
    FragmentManager supportFragmentManager = getSupportFragmentManager();
    DialogFragment fragment = new InitiateDialogFragment();
    FragmentTransaction fragmentTransaction = supportFragmentManager.beginTransaction();
    Fragment prev = getSupportFragmentManager().findFragmentByTag("InitiateDialogFragment");
    if (prev != null) {
        fragmentTransaction.remove(prev);
    }
    fragmentTransaction.addToBackStack(null);
    fragment.show(fragmentTransaction, "InitiateDialogFragment");
}
Also used : FragmentManager(androidx.fragment.app.FragmentManager) FragmentTransaction(androidx.fragment.app.FragmentTransaction) DialogFragment(androidx.fragment.app.DialogFragment) Fragment(androidx.fragment.app.Fragment) DialogFragment(androidx.fragment.app.DialogFragment)

Example 62 with DialogFragment

use of androidx.fragment.app.DialogFragment in project openScale by oliexdev.

the class ReminderPreferences method onDisplayPreferenceDialog.

@Override
public void onDisplayPreferenceDialog(Preference preference) {
    DialogFragment dialogFragment = null;
    if (preference instanceof TimePreference) {
        dialogFragment = TimePreferenceDialog.newInstance(preference.getKey());
    }
    if (dialogFragment != null) {
        dialogFragment.setTargetFragment(this, 0);
        dialogFragment.show(getParentFragmentManager(), "timePreferenceDialog");
    } else {
        super.onDisplayPreferenceDialog(preference);
    }
}
Also used : DialogFragment(androidx.fragment.app.DialogFragment)

Aggregations

DialogFragment (androidx.fragment.app.DialogFragment)62 Bundle (android.os.Bundle)22 InstrumentedDialogFragment (com.android.settings.core.instrumentation.InstrumentedDialogFragment)8 BottomSheetDialogFragment (com.google.android.material.bottomsheet.BottomSheetDialogFragment)8 Intent (android.content.Intent)7 Fragment (androidx.fragment.app.Fragment)5 FragmentTransaction (androidx.fragment.app.FragmentTransaction)4 Test (org.junit.Test)4 FullScreenDialogFragment (org.thoughtcrime.securesms.components.FullScreenDialogFragment)4 NonNull (androidx.annotation.NonNull)3 FragmentManager (androidx.fragment.app.FragmentManager)3 ConfirmationDialogFragment (com.fsck.k9.fragment.ConfirmationDialogFragment)3 FileDataStorageManager (com.owncloud.android.datamodel.FileDataStorageManager)3 OCFile (com.owncloud.android.datamodel.OCFile)3 OCUpload (com.owncloud.android.db.OCUpload)3 ScreenshotTest (com.owncloud.android.utils.ScreenshotTest)3 FragmentActivity (androidx.fragment.app.FragmentActivity)2 CustomDialogPreferenceCompat (com.android.settingslib.CustomDialogPreferenceCompat)2 CustomEditTextPreferenceCompat (com.android.settingslib.CustomEditTextPreferenceCompat)2 AttachmentDownloadDialogFragment (com.fsck.k9.fragment.AttachmentDownloadDialogFragment)2