How to get back to login screen once user click on signup button in kotlin?

I am beginner so if anyone help me i will be grateful thanks in advance

You need to realize that you did not gave us any information. Are you using Kotlin/JS, Kotlin/JVM,… Are you using a framework? Are you talking about web pages, android, desktop? If you share code it is also much easier for others to understand what your problem really is.

1 Like

i am using kotlin.this is what i did in registration activity

    private fun signUp() {
        val email: String = emailEditText.text.toString()
        val password: String = passwordEditText.text.toString()
        val confirmPassword: String = confirmEditText.text.toString()


        if (email.isEmpty() || password.isEmpty() || confirmPassword.isEmpty()) Toast.makeText(this, "One or more filds are empty", Toast.LENGTH_SHORT).show()
        else
            if (password != confirmPassword) Toast.makeText(this, "Password do not match", Toast.LENGTH_SHORT).show()
        if (Patterns.EMAIL_ADDRESS.matcher(email).matches() == false) Toast.makeText(this, "Email format is not Correct", Toast.LENGTH_SHORT).show()
        else {
            progressBar.visibility = View.VISIBLE
            auth.createUserWithEmailAndPassword(email, password)
                    .addOnCompleteListener(this) { task ->
                        progressBar.visibility = View.GONE
                        if (task.isSuccessful) {
                            d("sign up", "createUserWithEmail:success")
                            val user = auth.currentUser
                            Toast.makeText(baseContext, "SignUp is Success!", Toast.LENGTH_SHORT).show()
                        } else {
                            d("sign up", "createUserWithEmail:failure", task.exception)
                            Toast.makeText(baseContext, "Authentication failed.", Toast.LENGTH_SHORT).show()

                        }