//when cliquing on the button 'save_button'
save_button.setOnClickListener {
// geting the value from the two fields by using .text.toString()
val email = edit_name.text.toString()
val password = edit_password.text.toString()
// showing the result on the systeme's log
Log.d("Main activity","your email is " + email )
Log.d("Main activity", "your password is $password" )
// Then shows these values into the text view palete using .setText()
text_view.setText("$email " + "$password")
}
val EditText.asTextView: TextView get() = this as TextView
var EditText.value: CharSequence?
get() = asTextView.text
set(value) {
asTextView.text = value
}