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