2023-08-19 20:52:22 -06:00
|
|
|
package com.isolaatti.about
|
|
|
|
|
|
2024-11-09 01:22:18 -06:00
|
|
|
import android.content.Intent
|
2023-08-19 20:52:22 -06:00
|
|
|
import android.os.Bundle
|
|
|
|
|
import androidx.appcompat.app.AppCompatActivity
|
2024-01-27 01:25:42 -06:00
|
|
|
import androidx.browser.customtabs.CustomTabsIntent
|
|
|
|
|
import androidx.core.net.toUri
|
2024-11-09 01:22:18 -06:00
|
|
|
import com.google.android.gms.oss.licenses.OssLicensesMenuActivity
|
2024-01-27 01:25:42 -06:00
|
|
|
import com.isolaatti.BuildConfig
|
2024-04-06 20:08:34 -06:00
|
|
|
import com.isolaatti.R
|
2023-08-19 20:52:22 -06:00
|
|
|
import com.isolaatti.databinding.ActivityAboutBinding
|
|
|
|
|
|
|
|
|
|
class AboutActivity : AppCompatActivity() {
|
|
|
|
|
private lateinit var binding: ActivityAboutBinding
|
|
|
|
|
|
|
|
|
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
|
|
|
super.onCreate(savedInstanceState)
|
|
|
|
|
|
|
|
|
|
binding = ActivityAboutBinding.inflate(layoutInflater)
|
|
|
|
|
|
|
|
|
|
setContentView(binding.root)
|
2023-08-20 16:11:07 -06:00
|
|
|
|
|
|
|
|
binding.toolbar.setNavigationOnClickListener {
|
|
|
|
|
finish()
|
|
|
|
|
}
|
2024-01-27 01:25:42 -06:00
|
|
|
|
|
|
|
|
binding.blogButton.setOnClickListener {
|
|
|
|
|
CustomTabsIntent.Builder()
|
|
|
|
|
.build()
|
|
|
|
|
.launchUrl(this, BuildConfig.blogUrl.toUri())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
binding.sourceCodeButton.setOnClickListener {
|
|
|
|
|
CustomTabsIntent.Builder()
|
|
|
|
|
.setSendToExternalDefaultHandlerEnabled(true)
|
|
|
|
|
.build()
|
|
|
|
|
.launchUrl(this, BuildConfig.sourceCodeUrl.toUri())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
binding.openSourceLicences.setOnClickListener {
|
2024-11-09 01:22:18 -06:00
|
|
|
startActivity(Intent(this, OssLicensesMenuActivity::class.java))
|
|
|
|
|
|
2024-01-27 01:25:42 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
binding.privacyPolicyButton.setOnClickListener {
|
|
|
|
|
CustomTabsIntent.Builder()
|
|
|
|
|
.build()
|
|
|
|
|
.launchUrl(this, BuildConfig.privacyPolicy.toUri())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
binding.termsButon.setOnClickListener {
|
|
|
|
|
CustomTabsIntent.Builder()
|
|
|
|
|
.build()
|
|
|
|
|
.launchUrl(this, BuildConfig.terms.toUri())
|
|
|
|
|
}
|
2024-04-06 20:08:34 -06:00
|
|
|
|
|
|
|
|
binding.appVersion.text = getString(R.string.app_version, BuildConfig.VERSION_NAME)
|
2023-08-19 20:52:22 -06:00
|
|
|
}
|
|
|
|
|
}
|