I have an edit text inside a bottom sheet fragment. when the focus come on the edit text the layout goes up . i tried
android:windowSoftInputMode=\"adjustNo
I have faced the same scenario, Instead of EditText I used SearchView.A keyboard was not hidden when BottomSheetDialog goes to the hidden state.
Simply call this search_channel_template.clearFocus();
I will share my code which I was used to hiding the Keyboard.
search_channel_template = (SearchView) bottomSheetDialog.findViewById(R.id.search_channel_template);
txtVw_template_headerBS_down_id.setOnClickListener(new OnSingleClickListener() {
@Override
public void onSingleClick(View v) {
search_channel_template.clearFocus();
bottomSheetDialog.getBehavior().setState(BottomSheetBehaviorv2.STATE_HIDDEN);
}
});