Last active
September 29, 2017 12:28
-
-
Save whalemare/6cf1d3e55931c3ab2aec25f2157dfd02 to your computer and use it in GitHub Desktop.
Scala Android
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
import android.app.Activity | |
import android.os.Bundle | |
class MainActivity extends Activity { | |
override def onCreate(savedInstanceState: Bundle) = { | |
super.onCreate(savedInstanceState) | |
findView[Button](R.id.button).onClick { view : View => | |
Toast.makeText(this, "You have clicked the button", Toast.LENGTH_LONG).show() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment