相关疑难解决方法(0)

Android:如何将按钮对准键盘底部和键盘上方?

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">
<EditText
    android:id="@+id/editTextTitle"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:hint="@string/task_title"
    android:ems="10" >

    <requestFocus />
</EditText>

<RelativeLayout android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true">
<Button
    android:id="@+id/buttonSeven"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="7" />

</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

尝试对齐屏幕底部的几个按钮.但是当键盘弹出时,我希望按钮向上移动到键盘上方.怎么做?

android android-layout

6
推荐指数
1
解决办法
9161
查看次数

标签 统计

android ×1

android-layout ×1