I figured out a solution that seems to work fine. With only 1 problem. For some reason the Status Bar turns white with this piece of code.. Any idea why?
The proper way to do this would be to set soft input to match your needs.
try following for a fragment put this line in your fragment’s onCreate method:
or android:windowSoftInputMode="adjustPan|adjustResize"
Check which settings suits your needs better between adjustPan, adjustUnspesified, adjustResize or some other soft input options.
2
Answers
I figured out a solution that seems to work fine. With only 1 problem. For some reason the
Status Bar
turns white with this piece of code.. Any idea why?How I set the
Status Bar
color:The proper way to do this would be to set soft input to match your needs.
try following for a fragment put this line in your fragment’s onCreate method:
You can set multiple modes with a single line like
And if you are working in an activity you can just adjust it in your android manifest file for each activity
or
android:windowSoftInputMode="adjustPan|adjustResize"
Check which settings suits your needs better between adjustPan, adjustUnspesified, adjustResize or some other soft input options.