In my main activity there is a RelativeLayout that has 2 childs:
RelativeLayout
ImageView
LinearLa
Add this line of code in DialogFragment Oncreateview below R.layout.layout_ui
getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN | WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);