前言
在日常开发过程中经常会遇到提交保存等需求,例如在相对布局中上方有若干个输入框,提交保存按钮在布局的最下方,我们在输入完全部信息后,想要点击提交必须手动关闭软键盘,此时按钮是被遮挡状态,交互很不友好。
一、使用步骤
1.XML示例
代码如下(示例):
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:orientation="vertical"
tools:ignore="MissingDefaultResource">
<RelativeLayout
android:layout_width="match