有残疾编辑文本布局 [英] layout having disabled edit text

查看:135
本文介绍了有残疾编辑文本布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建立的用户有一个列表视图中显示列表中的一个应用程序这个 ,当我点击列表项目它会告诉我点击用户的完整个人资料这个。我承担这个布局的EditText字段(我用同样的布局,以显示我的个人资料是可编辑),其文本是动态填充(如点击用户的数据填写此表)。由于,这只能说明我关心的个人资料用户放大器;所以我禁用这些编辑文本字段通过调用每一个这种方法编辑我现在还不需要对用户数据进行任何编辑。

I am building one app having one list view showing list of users this, when i click on list item it will show me complete profile of clicked user this. I take EditText fields on this layout (i use the same layout to show my own profile which is editable) whose text is filled dynamically(e.g., data of clicked user is filled in this form).Since, it only show me profile of concern user & i not need any editing on user data so i disable editing on these edit text fields by calling this method on each one.

的setEnabled(假)

setEnabled(false)

此布局滚动,当我滚动这一观点是对这些编辑的文本字段启用编辑这个

this layout is scrollable and when i scroll this view it enable editing on these edit text field this

我禁用编辑如何对这些编辑的文本字段... ???

任何建议,请,将AP preciated任何指针,样本code做到这一点。

Any suggestions please, would appreciated any pointer, sample code to do this

推荐答案

您可以采取的TextView,而不是EditText上,因为它是一个标签,如果你仍然想它看起来像编辑字段。您可以通过设置TextView的背景使用默认EditField中的背景

You can take TextView instead of EditText as it is a label, and if you still want it to look like edit field. you can use default editfield background by setting background of textView to

@android:xml文件中可绘制/ edit_text

@android:drawable/edit_text in xml file.

这篇关于有残疾编辑文本布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆