Created
March 12, 2016 04:46
-
-
Save vincent-paing/2ffcc2f9588df8921f1a to your computer and use it in GitHub Desktop.
MainActivity After Converting
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.OnClickListener { 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