Last active
July 30, 2017 20:18
-
-
Save Lanace/91e2fa6923ab3ad8f9da5eaf890784d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.lanace.kotlinexample | |
import android.os.Bundle | |
import android.support.v7.app.AppCompatActivity | |
import android.widget.Toast | |
import kotlinx.android.synthetic.main.activity_main.* | |
class MainActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
sendButton.setOnClickListener { | |
var name = nameEditText.text.toString() | |
Toast.makeText(this, name, Toast.LENGTH_SHORT).show() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment