You must set a custom theme for the fragment dialog by inheriting the current Android dialog and adding the windowSoftInputMode option:
<style name="DialogFragmentStyle" parent="@android:style/Theme.Dialog"> <item name="android:windowSoftInputMode">stateHidden|adjustResize</item> </style>
Use your theme in the fragment dialog when creating a constructor
Dialogue dialogue = new dialogue (getActivity (), R.style.DialogFragmentStyle );
public class MyFragmentDialog extends DialogFragment{ @Override public Dialog onCreateDialog(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Dialog dialog = new Dialog(getActivity(), R.style.DialogFragmentStyle);
source share