Bimba.git

commit 290277d0b5c83f83db48ca69ff60351f7141a99e

Author: Adam Evyčędo <git@apiote.xyz>

handle buttons in about activity

 app/src/main/java/xyz/apiote/bimba/czwek/AboutActivity.kt | 22 ++++++++


diff --git a/app/src/main/java/xyz/apiote/bimba/czwek/AboutActivity.kt b/app/src/main/java/xyz/apiote/bimba/czwek/AboutActivity.kt
index 6bdc0ca3bfbf0fd215f0d4df8e0beeea3f1cc3f0..836b721962f4c3a6f6056cffb95c1897a5d31ca6 100644
--- a/app/src/main/java/xyz/apiote/bimba/czwek/AboutActivity.kt
+++ b/app/src/main/java/xyz/apiote/bimba/czwek/AboutActivity.kt
@@ -4,12 +4,32 @@ // SPDX-License-Identifier: GPL-3.0-or-later
 
 package xyz.apiote.bimba.czwek
 
+import android.content.Intent
+import android.net.Uri
 import android.os.Bundle
 import androidx.appcompat.app.AppCompatActivity
+import xyz.apiote.bimba.czwek.databinding.ActivityAboutBinding
+
 
 class AboutActivity : AppCompatActivity() {
+    private var _binding: ActivityAboutBinding? = null
+    private val binding get() = _binding!!
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
-        setContentView(R.layout.activity_about)
+        _binding = ActivityAboutBinding.inflate(layoutInflater)
+        setContentView(binding.root)
+
+        binding.mastodon.setOnClickListener {
+            startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("https://floss.social/@bimba")))
+        }
+        binding.website.setOnClickListener {
+            startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("https://bimba.apiote.xyz")))
+        }
+        binding.code.setOnClickListener {
+            startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("https://git.apiote.xyz/Bimba.git")))
+        }
+        binding.translate.setOnClickListener {
+            startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("https://hosted.weblate.org/projects/bimba/")))
+        }
     }
 }