0

hey can someone please help my i'm trying to met the button gray if there is no text in the editText1_id and the editText1_passcode

sportbetting.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view){

                if(sportbetting)
                    sportbetting.getBackground().setColorFilter(Color.GRAY, PorterDuff.Mode.MULTIPLY);
                else
                    sportbetting.getBackground().setColorFilter(null);

                if( editText1_id.length() < 4 && editText1_passcode.getText().length() < 4){
                    Toast.makeText(getApplicationContext(), " Please complete your UserID and Passcode before you can continue", Toast.LENGTH_SHORT).show();
                }else {
                    userId = editText1_id.getText().toString();
                    passcode = editText1_passcode.getText().toString();
                    Intent intent = new Intent(Login_Activity.this, Main_Activity.class);
                    startActivity(intent);
                    finish();
                }
            }

        });`
Muthukrishnan Rajendran
  • 11,122
  • 3
  • 31
  • 41
johan
  • 19
  • 5

0 Answers0