Keyboard hides BottomSheetDialogFragment

后端 未结 6 1408
走了就别回头了
走了就别回头了 2020-12-04 13:22

There are more fields below the keyboard. This happened when i updated the support library. I know it\'s Kotlin but it looks almost the same as java. How do I fix this issue

6条回答
  •  -上瘾入骨i
    2020-12-04 14:08

    This is working for me

    public class CustomBottomSheetDialogFragment extends BottomSheetDialogFragment 
    {
     @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle 
        savedInstanceState) {
    View v = inflater.inflate(R.layout.content_dialog_bottom_sheet, container, false);
    
    
    getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
        return v;
     }
    

提交回复
热议问题