0

我被困在一个场景中。我有一个登录表格。我想将它显示为对某些用户禁用。我可以获得该用户,但我不知道如何从窗口中移除焦点。

//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


}
4

1 回答 1

0

首先从您的登录 xml 获取您的父布局并尝试这个

parentLayout.setEnabled(false);
于 2013-01-18T07:36:18.070 回答