![](/img/trans.png)
[英]How to Hide keyboard in Xamarin Android after clicking outside Edittext
[英]EditText Xamarin Android keyboard not showing up
有人知道這是什么問題嗎? 在模擬和我的設備上,當選擇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>
取出focusable
和focusableInTouchMode
從EditTexts。 除非您正在開發游戲,否則應避免focusableInTouchMode
。 看看這個
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.