diff --git a/app/src/main/java/com/simplemobiletools/camera/activities/LicenseActivity.java b/app/src/main/java/com/simplemobiletools/camera/activities/LicenseActivity.java deleted file mode 100644 index a40a3ea0..00000000 --- a/app/src/main/java/com/simplemobiletools/camera/activities/LicenseActivity.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.simplemobiletools.camera.activities; - -import android.content.Intent; -import android.net.Uri; -import android.os.Bundle; - -import com.simplemobiletools.camera.R; - -import butterknife.ButterKnife; -import butterknife.OnClick; - -public class LicenseActivity extends SimpleActivity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_license); - ButterKnife.bind(this); - } - - @OnClick(R.id.license_butterknife_title) - public void butterKnifeClicked() { - openUrl(R.string.butterknife_url); - } - - private void openUrl(int id) { - final String url = getResources().getString(id); - final Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); - startActivity(browserIntent); - } -} diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/activities/LicenseActivity.kt b/app/src/main/kotlin/com/simplemobiletools/camera/activities/LicenseActivity.kt new file mode 100644 index 00000000..72631a0f --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/camera/activities/LicenseActivity.kt @@ -0,0 +1,22 @@ +package com.simplemobiletools.camera.activities + +import android.content.Intent +import android.net.Uri +import android.os.Bundle +import com.simplemobiletools.camera.R +import kotlinx.android.synthetic.main.activity_license.* + +class LicenseActivity : SimpleActivity() { + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_license) + license_butterknife_title.setOnClickListener { openUrl(R.string.butterknife_url) } + } + + private fun openUrl(id: Int) { + val url = resources.getString(id) + val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(url)) + startActivity(browserIntent) + } +}