我陷入困境。我有一个登录表格。我想将它显示为某些用户的禁用状态。我可以得到那些用户,但我不知道如何从窗口中删除焦点。
//to check whether the current user is administrator or not
public void checkAdministrator(){
String owner = ParseValues.parsedGroupList.get(indexofGroup).getGroup_owner();
String currentUser = CCMStaticVariable.loginUserId+"@abc.com";
if(owner.equalsIgnoreCase(currentUser)){
administrator=true;
}
else{
administrator=false;
}
}
现在 -
if(!administrator){
//here I want to disable the whole Activity, I just want to show the activity in disabled state
}
答案 0 :(得分:0)
首先从登录xml获取您的父布局并尝试此
parentLayout.setEnabled(false);