有谁知道这是什么问题吗?在模拟设备和我的设备上,当选择EditText时,键盘显示正常,但在特定设备(华为lyo l01)上,键盘显示不正常。
已尝试的内容:-清除分区缓存-清除键盘缓存-使用不同的键盘(gboard和swiftkey)
所有这些都没有帮助。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/txtScreenName"
android:textIsSelectable="true"
android:focusable="true"
android:focusableInTouchMode="true" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/txtMessage"
android:textIsSelectable="true"
android:focusable="true"
android:focusableInTouchMode="true" />
<CheckBox
android:text="A"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/checkBox1" />
<Button
android:text="Add"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/btnAdd" />
<Button
android:text="Remove"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/btnRemove" />
<Button
android:text="Save"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/btnSave" />
<ListView
android:minWidth="25px"
android:minHeight="25px"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/lvFollowers"
android:clickable="true"
android:choiceMode="singleChoice"
android:contextClickable="true"
android:layout_marginBottom="0.0dp" />
</LinearLayout>
发布于 2018-06-26 05:30:44
从EditTexts中卸下focusable
和focusableInTouchMode
。除非你正在开发一个游戏,否则应该避免使用focusableInTouchMode
。看一看this
https://stackoverflow.com/questions/51030285
复制相似问题