add License activity content

This commit is contained in:
tibbi 2016-12-09 20:48:39 +01:00
parent 3f0ee9da5a
commit 7dd27f51b9
1 changed files with 13 additions and 0 deletions

View File

@ -1,9 +1,22 @@
package com.simplemobiletools.thankyou.activities package com.simplemobiletools.thankyou.activities
import android.content.Intent
import android.net.Uri
import android.os.Bundle import android.os.Bundle
import com.simplemobiletools.thankyou.R
import kotlinx.android.synthetic.main.activity_license.*
class LicenseActivity : SimpleActivity() { class LicenseActivity : SimpleActivity() {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
setContentView(R.layout.activity_license)
license_kotlin_title.setOnClickListener { openUrl(R.string.kotlin_url) }
}
private fun openUrl(id: Int) {
val url = resources.getString(id)
val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
startActivity(browserIntent)
} }
} }