Skip to content

Instantly share code, notes, and snippets.

@sambaiz
Last active December 2, 2018 21:57
Show Gist options
  • Save sambaiz/11318049 to your computer and use it in GitHub Desktop.
Save sambaiz/11318049 to your computer and use it in GitHub Desktop.
Kotlin Android
val button: Button = findViewById(R.id.Button02) as Button
button setOnClickListener (object: View.OnClickListener {
public override fun onClick(view: View): Unit {
}
})
val i = Intent(getApplicationContext() as Context, javaClass<MainActivity2>())
startActivity(i)
private fun getApiKey() : String? {
val appliInfo : ApplicationInfo? =
getPackageManager()?.getApplicationInfo(getPackageName(), PackageManager.GET_META_DATA)
return appliInfo?.metaData?.getString("fb_api_key")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment