使不可编辑的EditText组件 [英] Making not editable EditText component
本文介绍了使不可编辑的EditText组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个编辑文本。我怎样才能使它不从code编辑。
通过给标签机器人:编辑
我们可以在布局做。但我需要做的是在code ......请帮助
I have an edit text. How can I make it non editable from the code.
By giving the tag android:editable
we can do in the layout.. But I need to do it in the code...Pls Help
推荐答案
我相信这是因为
editText.setEnabled(false);
这篇关于使不可编辑的EditText组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文