From 86d7b3745ef7cad10eefbf8fc5b82fcbfae5876e Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 9 Dec 2016 23:41:05 +0100 Subject: [PATCH] add a More apps and Donate button to About --- .../thankyou/activities/AboutActivity.kt | 16 ++++++++++++- app/src/main/res/layout/activity_about.xml | 24 +++++++++++++++++-- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/thankyou/activities/AboutActivity.kt b/app/src/main/kotlin/com/simplemobiletools/thankyou/activities/AboutActivity.kt index 2a39dd8..18a6874 100644 --- a/app/src/main/kotlin/com/simplemobiletools/thankyou/activities/AboutActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/thankyou/activities/AboutActivity.kt @@ -18,12 +18,14 @@ class AboutActivity : SimpleActivity() { setContentView(R.layout.activity_about) setupEmail() - setupCopyright() + setupMoreApps() setupRateUs() setupInvite() setupLicense() + setupDonate() setupFacebook() setupGPlus() + setupCopyright() } private fun setupEmail() { @@ -34,6 +36,12 @@ class AboutActivity : SimpleActivity() { about_email.movementMethod = LinkMovementMethod.getInstance() } + private fun setupMoreApps() { + about_more_apps.setOnClickListener { + startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/dev?id=9070296388022589266"))) + } + } + private fun setupCopyright() { val versionName = BuildConfig.VERSION_NAME val year = Calendar.getInstance().get(Calendar.YEAR) @@ -76,6 +84,12 @@ class AboutActivity : SimpleActivity() { } } + fun setupDonate() { + about_donate.setOnClickListener { + startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("http://simplemobiletools.github.io/donate"))) + } + } + fun setupFacebook() { about_facebook.setOnClickListener { var link = "https://www.facebook.com/simplemobiletools" diff --git a/app/src/main/res/layout/activity_about.xml b/app/src/main/res/layout/activity_about.xml index a26f39e..c8c3c60 100644 --- a/app/src/main/res/layout/activity_about.xml +++ b/app/src/main/res/layout/activity_about.xml @@ -36,12 +36,22 @@ android:text="@string/email"/> + + @@ -66,10 +76,20 @@ android:textColor="@color/colorPrimary"/> + +