0

现在我正在实现自定义的 Android 键盘。我想有一个文本字段来搜索键盘内的联系人。但是编辑文本无法编辑。

这是我在键盘视图中的代码

<LinearLayout
   android:gravity="center_vertical"
   android:orientation="vertical"
   android:layout_width="match_parent"
   android:layout_height="wrap_content">
      <com.google.android.material.textfield.TextInputEditText
           android:id="@+id/name"
           android:focusable="true"
           android:focusableInTouchMode="true"
           android:focusedByDefault="true"
           android:layout_width="match_parent"
           android:layout_height="match_parent"/>

      <android.inputmethodservice.KeyboardView
              android:layout_width="match_parent"
              android:layout_height="265dp"/>
</LinearLayout>

预期结果

在此处输入图像描述

谢谢

4

0 回答 0