Search code examples
androidandroid-softkeyboardfloating-action-button

Set FAB (Floating Action Button) above keyboard


Already asked here but without a proper answer.

I want the FAB to float on top of the keyboard. that's it.

For example

  1. Open a new Blank Activity template project with Android Studio
  2. Change the Hello World TextView to EditText
  3. See image below:

enter image description here


Solution

  • Turns out it's pretty easy,

    • Add android:windowSoftInputMode="adjustResize" to your activity in manifest
    • Make sure your root view in layout xml, has android:fitsSystemWindows="true" property