My app design makes me having this kind of layout for every form view: a floating button at the bottom of the view. I'm using ConstraintLayout
to set dynamically the height of the button with always the same left/right margin no matter the screen width, and so I end up having this layout:
<ConstraintLayout>
<ScrollView>
<EditText/>
<EditText/>
<!-- ... -->
<ConstraintLayout /> (1)
</ScrollView>
<Button/>
</ConstraintLayout>
(1) A clear view with the height of the bottom button in order not to hide the views at the bottom in the scroll view that would be hidden by the button
Basically, that's what it looks like:
Now the problem I encounter is when I tap an edit text at the bottom, for example here the 4th one:
The edit text moves up the keyboard, but not the floating button, and it often comes to be hidden by it. I know that I have to do something in the edit text's onFocusChanged()
method, but I don't know what...