Created
February 4, 2016 21:17
-
-
Save juanchosaravia/38ecab272894b83c158a 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
class MainActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
val toolbar = findViewById(R.id.toolbar) as Toolbar | |
setSupportActionBar(toolbar) | |
val fab = findViewById(R.id.fab) as FloatingActionButton | |
fab.setOnClickListener { view -> Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG).setAction("Action", null).show() } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I need Button declaration for kotlin