android - There is an EditText in the bottomsheetdialog. When the soft keyboard pops up, the Dialog will be pushed upward.
As the title shows, the Dialog will be squeezed upward, causing the interface effect to be very ugly. As shown in the picture: 

I set android:windowSoftInputMode="adjustNothing" in the Activity and also set android:windowSoftInputMode="adjustNothing" in the Dialog dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING); After the keyboard pops up, it still does not work It will push the Dialog upward
I replaced bottomSheetDialog with BottomSheetFragment, and the effect was even worse, as shown below: 
I hope everyone can have a good solution to share
1 answers
What I currently think of is to customize the viewGroup as the top-level layout, and monitor the soft keyboard in onMeasure to dynamically change the height. This requires changing the windowSoftInputMode to adjustResize.
Hot tools Tags
Hot Questions
Popular tool
vc9-vc14 (32+64 bit) runtime library collection (link below)
Download the collection of runtime libraries required for phpStudy installation
VC9 32-bit
VC9 32-bit phpstudy integrated installation environment runtime library
PHP programmer toolbox full version
Programmer Toolbox v1.0 PHP Integrated Environment
VC11 32-bit
VC11 32-bit phpstudy integrated installation environment runtime library
SublimeText3 Chinese version
Chinese version, very easy to use
Hot Topics
20528
7
13637
4






