Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 删除对editText的焦点_Android_Android Edittext_Autofocus - Fatal编程技术网

Android 删除对editText的焦点

Android 删除对editText的焦点,android,android-edittext,autofocus,Android,Android Edittext,Autofocus,我需要一个帮助,以消除在android编辑文本的重点 我用过这个 android:focusable="false" 但它会禁用编辑文本。请帮帮我, 如果可能,发布代码,然后使用此代码 android:focusable=“true” android:focusableInTouchMode=“true”在您的editText上调用editText.clearFocus() 在活动中添加此行 android:editable="false" 这种方式还可以帮助您从编辑文本中删除焦点。 将此添

我需要一个帮助,以消除在android编辑文本的重点

我用过这个

android:focusable="false"
但它会禁用编辑文本。请帮帮我,
如果可能,发布代码

,然后使用此代码

android:focusable=“true”
android:focusableInTouchMode=“true”

在您的editText上调用editText.clearFocus()

在活动中添加此行

android:editable="false"

这种方式还可以帮助您从编辑文本中删除焦点。 将此添加到要删除EditText的清单中的您的活动中

android:windowSoftInputMode="stateHidden"

添加您的布局XML代码U smart buddy,您必须在编辑文本所在的线性/相对布局中使用此代码。如果您不属于此问题,请标记正确的答案。请在XML中标记我需要的答案。不可能有没有焦点的活动编辑文本,我无法理解您为什么需要此代码。也许如果你能分享你需要的行为,我们可以帮助你。当您必须删除编辑文本上的焦点时?