Android 键盘上方的黑线

Android 键盘上方的黑线,android,android-layout,Android,Android Layout,有人知道如何避免键盘上方的黑线吗?当我的键盘显示预测词行后,它就变了 在我的层中,我使用片段,我需要在下面用EditText显示行。但当用户结束输入时,他看到键盘上方的黑线是不需要的 这是我的密码: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="ma

有人知道如何避免键盘上方的黑线吗?当我的键盘显示预测词行后,它就变了

在我的层中,我使用片段,我需要在下面用EditText显示行。但当用户结束输入时,他看到键盘上方的黑线是不需要的

这是我的密码:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>

<!-- TODO: Update blank fragment layout -->
<FrameLayout
    android:layout_width="match_parent"

    android:layout_height="0dp"
    android:layout_weight="1"

    android:id="@+id/word_set_fragment_container"
    >

    <TextView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:text="Experimental layer"
         />


</FrameLayout>

<LinearLayout

    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    android:background="@drawable/border"

    android:paddingTop="5dp"
    android:paddingBottom="3dp"
    android:clickable="true"
    >
    <Button

        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="⇣"
        android:layout_gravity="bottom"/>
    <EditText

        android:inputType="text|textCapSentences"
        android:imeOptions="actionDone"
        android:layout_weight="1"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:hint="@string/hint_new_word"
        android:text=""
        />
</LinearLayout>

</LinearLayout>


对不起,我的英语不好。

这看起来像是真正的安卓键盘。。这是不可更改的。

为了避免键盘上出现黑线,您应该在键盘布局xml文件中添加
layout\u margin=“0px”
android:padding=“0px”

<android.inputmethodservice.KeyboardView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/keyboard"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="0px"
    android:padding="0px"
    android:layout_alignParentBottom="true"
    android:keyPreviewLayout ="@layout/preview"/>