Android realizes the effect that the top fixed middle part moves up when the pop-up input method is used

preface

Recently, I encountered a problem when working on a project. In the feedback, the submit button is written to the top. When the user enters the feedback or email mobile number, the pop-up input method will move up the whole page, resulting in the failure to display the submit button.

Obviously, such an interface is very unfriendly. After finding some data without results, I had to find a way to solve it myself. After many attempts, I finally achieved the desired effect. Special record here, hoping to help people in need. The effect picture is as follows. Don't blame it if it's not well written.

design sketch

Solution ideas

Use Scrollview to wrap the contents in the middle, and then remove the scroll bar of Scrollview

Code display

View file:

Java files:

Remove the scroll bar from the Scrollview

The above is the whole content of this article. I hope the content of this article can bring some help to your study or work. At the same time, I also hope to support a lot of programming tips!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>