From a29a087f124061ae8200edc51fdfcd3ff0d9a7c8 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Thu, 24 May 2018 21:22:37 +0200 Subject: add links to *Terms Of Use* and *Privacy Policy* to AboutActivity --- .../java/de/pixart/messenger/ui/AboutActivity.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/main/java') diff --git a/src/main/java/de/pixart/messenger/ui/AboutActivity.java b/src/main/java/de/pixart/messenger/ui/AboutActivity.java index 093ea3bb7..88f863476 100644 --- a/src/main/java/de/pixart/messenger/ui/AboutActivity.java +++ b/src/main/java/de/pixart/messenger/ui/AboutActivity.java @@ -1,12 +1,18 @@ package de.pixart.messenger.ui; +import android.content.Intent; +import android.net.Uri; import android.os.Bundle; +import android.widget.Button; import de.pixart.messenger.R; import de.pixart.messenger.utils.ThemeHelper; public class AboutActivity extends XmppActivity { + private Button privacyButton; + private Button termsOfUseButton; + @Override protected void refreshUiReal() { @@ -24,5 +30,18 @@ public class AboutActivity extends XmppActivity { setContentView(R.layout.activity_about); setSupportActionBar(findViewById(R.id.toolbar)); configureActionBar(getSupportActionBar()); + + privacyButton = findViewById(R.id.show_privacy_policy); + privacyButton.setOnClickListener(view -> { + final Uri uri = Uri.parse("https://jabber.pix-art.de/privacy/"); + Intent browserIntent = new Intent(Intent.ACTION_VIEW, uri); + startActivity(browserIntent); + }); + termsOfUseButton = findViewById(R.id.show_terms_of_use); + termsOfUseButton.setOnClickListener(view -> { + final Uri uri = Uri.parse("https://jabber.pix-art.de/termsofuse/"); + Intent browserIntent = new Intent(Intent.ACTION_VIEW, uri); + startActivity(browserIntent); + }); } } \ No newline at end of file -- cgit v1.2.3