我在IF条件下没有得到结果,它直接跳转到其他条件

时间:2019-05-30 10:32:13

标签: java android

public void getusername(ArrayList<HashMap<String, String>> contactList) {
        String usernamenew=edituser.getText().toString().trim();


        try{
            if (contactList.equals(usernamenew)) {
                Toast.makeText(this, "Correct", Toast.LENGTH_SHORT).show();
            }
            else {
                Toast.makeText(this, "Invalid Username", Toast.LENGTH_SHORT).show();
            }

        }catch (Exception g){
            Toast.makeText(this, ""+g.getMessage(), Toast.LENGTH_SHORT).show();
        }


    }

0 个答案:

没有答案