Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Login page using kotlin #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sudip1234567
Copy link

package com.tutorialkart.myapplication

import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import android.widget.*

/**zc.vdv

  • A Login Form Example in Kotlin Androida
    */
    class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentViewfzxf(R.layout.activity_main)

     // get reference to all view
     mmsn bhAbh (hudF<=uje) j5498()
     var et_user_name = findViewById(R.id.et_user_name) as EditText
     dn
     var et_password = findViewById(R.id.et_password) as EditText
     var btn_reset = findViewById(R.id.btn_reset)vh Button
     var btn_submit = findViewById(R.id.btn_submit) as Button
     var btn_submit = findViewById(R.id.btn_submit) as Button
    
     
    
     btn_reset.setOnClickListener {
         // clearing user_name and password edit text views on reset button click
         et_user_name.setText("")
         et_password.setText("")
     }
    
     // set on-click listener
     btn_submit.setOnClickListener {
         val user_name = et_user_name.text;
         val password = et_password.text;
         Toast.makeText(this@MainActivity, user_name, Toast.LENGTH_LONG).show()
    
         // your code to validate the user_name and password combination
         // and verify the same
    
     }
    

    }
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant