I've an activity that specified as dialog with this line in Manifest
like this
android:theme="@android:style/Theme.Dialog"
so how to prevent soft Keyboard from pushing it up and resizing ??
You can force Android to hide the virtual keyboard using the InputMethodManager, calling hideSoftInputFromWindow , passing in the token of the window containing your focused view. This will force the keyboard to be hidden in all situations.
You can simply switch your activity's windowSoftInputMode flag to "adjustPan". Check the official documentation for more info.
<activity
...
android:windowSoftInputMode="adjustPan|adjustResize">
</activity>
If you are using ScrollView add this too android:isScrollContainer="false"
to the ScrollView
.
Try it..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With