This is what worked for me after looking at a lot of solutions:
AndroidManifest.xml
Add
android:windowSoftInputMode="stateVisible|adjustResize"
to an activity
style.xml
file,in activity style
<item name="android:windowActionBarOverlay">true</item>
Props to this post: Scroll entire layout up when keyboard is shown