From 6da7db72f4e1452e01da38a2c0bb086772ffe0a0 Mon Sep 17 00:00:00 2001 From: Raman deep Date: Wed, 28 Oct 2020 05:44:37 +0000 Subject: [PATCH] Delete Login_Screen.java --- .../ArrestTB/Login_Screen.java | 70 ------------------- 1 file changed, 70 deletions(-) delete mode 100644 app/src/main/java/com/ShanMukhaInnovations/ArrestTB/Login_Screen.java diff --git a/app/src/main/java/com/ShanMukhaInnovations/ArrestTB/Login_Screen.java b/app/src/main/java/com/ShanMukhaInnovations/ArrestTB/Login_Screen.java deleted file mode 100644 index f681401..0000000 --- a/app/src/main/java/com/ShanMukhaInnovations/ArrestTB/Login_Screen.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.ShanMukhaInnovations.ArrestTB; - -import androidx.appcompat.app.AppCompatActivity; -import androidx.appcompat.widget.AppCompatCheckBox; - -import android.content.Intent; -import android.os.Bundle; -import android.text.method.HideReturnsTransformationMethod; -import android.text.method.PasswordTransformationMethod; -import android.view.View; -import android.widget.Button; -import android.widget.CompoundButton; -import android.widget.EditText; -import android.widget.Toast; - - -public class Login_Screen extends AppCompatActivity { - - private EditText Username; - private Button login; - private android.widget.EditText Password; - private AppCompatCheckBox checkbox; - - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_login__screen); - Username=findViewById(R.id.username); - Password=findViewById(R.id.password); - login=findViewById(R.id.login); - checkbox = (AppCompatCheckBox) findViewById(R.id.showpassword); - Password = (EditText) findViewById(R.id.password); - checkbox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { - @Override - public void onCheckedChanged(CompoundButton compoundButton, boolean isChecked) { - if (isChecked) { - // show password - Password.setTransformationMethod(HideReturnsTransformationMethod.getInstance()); - } else { - // hide password - Password.setTransformationMethod(PasswordTransformationMethod.getInstance()); - } - } - }); - login.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - String username = Username.getText().toString(); - String password = Password.getText().toString(); - if(username.length()==0 || password.length()==0) - { - Toast.makeText(Login_Screen.this, "Please Fill all the fields", Toast.LENGTH_SHORT).show(); - - } - - else if (username.equals("Arresttb") && password.equals("tb123")) { - Intent intent = new Intent(Login_Screen.this, home.class); - startActivity(intent); - - } else { - Toast.makeText(Login_Screen.this, "Invalid Credentials ", Toast.LENGTH_SHORT).show(); - - } - } - }); - - - } -}