Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.myapplication
- import android.widget.TextView
- import android.widget.EditText
- import android.widget.Button
- import androidx.appcompat.app.AppCompatActivity
- import android.os.Bundle
- import android.view.View
- class MainActivity : AppCompatActivity() {
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- setContentView(R.layout.activity_main)
- val displayEmailTextView: TextView = findViewById(R.id.displayEmailTextView)
- val emailEditText: EditText = findViewById(R.id.emailEditText)
- findViewById<Button>(R.id.submit).setOnClickListener {
- displayEmailTextView.text = "Twรณj adres e-mail to: ${emailEditText.text}"
- }
- }
- fun newView(view: View){
- setContentView(R.layout.new_layout)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement