I have a dialogfragment for a floating dialog which includes a special keyboard that pops up when a user presses inside an EditText field (the normal IME is stopped from bei
Use Fragment onCancel override method. It's called when you press back. here is a sample:
@Override public void onCancel(DialogInterface dialog) { super.onCancel(dialog); // Add you codition }