Skip to content

Instantly share code, notes, and snippets.

@LeonidIvankin
Created July 11, 2022 05:17
Show Gist options
  • Save LeonidIvankin/d8b96ef6d97927e811cfa292071d824a to your computer and use it in GitHub Desktop.
Save LeonidIvankin/d8b96ef6d97927e811cfa292071d824a to your computer and use it in GitHub Desktop.
package com.leonidivankin.draftandroid.articles.autofill
import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.leonidivankin.draftandroid.databinding.ActivityLoginBinding
class LoginActivity : AppCompatActivity() {
private lateinit var binding: ActivityLoginBinding
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityLoginBinding.inflate(layoutInflater)
setContentView(binding.root)
title = "LoginActivity"
binding.buttonEnter.setOnClickListener {
if (binding.editTextEmail.text.toString() == "login@gmail.com"
&& binding.editTextPhone.text.toString() == "+1 650 123 4567"
&& binding.editTextPassword.text.toString() == "123456"
)
startActivity(Intent(this, MainActivity::class.java))
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment