0
我在我的应用程序中有一个窗体。我只希望管理员有权编辑表单。我该怎么办?如何禁用GUI的一部分
nameET = (EditText) mForm.findViewById(R.id.nameET);
descET = (EditText) mForm.findViewById(R.id.descET);
我在我的应用程序中有一个窗体。我只希望管理员有权编辑表单。我该怎么办?如何禁用GUI的一部分
nameET = (EditText) mForm.findViewById(R.id.nameET);
descET = (EditText) mForm.findViewById(R.id.descET);
尝试使用setEnabled(false)
禁用EditText
秒。
if (!admin) {
nameET.setEnabled(false);
descET.setEnabled(false);
}
不要让它成为'EditText'吗? –