diff --git a/app/src/main/java/eu/faircode/email/FragmentGmail.java b/app/src/main/java/eu/faircode/email/FragmentGmail.java
index 098187e09c..35be66119d 100644
--- a/app/src/main/java/eu/faircode/email/FragmentGmail.java
+++ b/app/src/main/java/eu/faircode/email/FragmentGmail.java
@@ -76,6 +76,7 @@ public class FragmentGmail extends FragmentBase {
private TextView tvTitle;
private TextView tvPrivacy;
+ private TextView tvPrivacyApp;
private Button btnGrant;
private TextView tvGranted;
private EditText etName;
@@ -122,6 +123,7 @@ public class FragmentGmail extends FragmentBase {
// Get controls
tvTitle = view.findViewById(R.id.tvTitle);
tvPrivacy = view.findViewById(R.id.tvPrivacy);
+ tvPrivacyApp = view.findViewById(R.id.tvPrivacyApp);
btnGrant = view.findViewById(R.id.btnGrant);
tvGranted = view.findViewById(R.id.tvGranted);
etName = view.findViewById(R.id.etName);
@@ -149,6 +151,14 @@ public class FragmentGmail extends FragmentBase {
}
});
+ tvPrivacyApp.setPaintFlags(tvPrivacyApp.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
+ tvPrivacyApp.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Helper.view(v.getContext(), Uri.parse(Helper.PRIVACY_URI), false);
+ }
+ });
+
btnGrant.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
diff --git a/app/src/main/java/eu/faircode/email/FragmentOAuth.java b/app/src/main/java/eu/faircode/email/FragmentOAuth.java
index cb57031ca7..172ff19e90 100644
--- a/app/src/main/java/eu/faircode/email/FragmentOAuth.java
+++ b/app/src/main/java/eu/faircode/email/FragmentOAuth.java
@@ -114,6 +114,7 @@ public class FragmentOAuth extends FragmentBase {
private TextView tvTitle;
private TextView tvPrivacy;
+ private TextView tvPrivacyApp;
private EditText etName;
private EditText etEmail;
private EditText etTenant;
@@ -171,6 +172,7 @@ public class FragmentOAuth extends FragmentBase {
// Get controls
tvTitle = view.findViewById(R.id.tvTitle);
tvPrivacy = view.findViewById(R.id.tvPrivacy);
+ tvPrivacyApp = view.findViewById(R.id.tvPrivacyApp);
etName = view.findViewById(R.id.etName);
etEmail = view.findViewById(R.id.etEmail);
etTenant = view.findViewById(R.id.etTenant);
@@ -196,12 +198,23 @@ public class FragmentOAuth extends FragmentBase {
// Wire controls
- tvPrivacy.setVisibility(TextUtils.isEmpty(privacy) ? View.GONE : View.VISIBLE);
tvPrivacy.setPaintFlags(tvPrivacy.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
tvPrivacy.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- Helper.view(v.getContext(), Uri.parse(privacy), false);
+ if (TextUtils.isEmpty(privacy))
+ Helper.view(v.getContext(), Uri.parse(Helper.PRIVACY_URI), false);
+ else
+ Helper.view(v.getContext(), Uri.parse(privacy), false);
+ }
+ });
+
+ tvPrivacy.setVisibility(TextUtils.isEmpty(privacy) ? View.GONE : View.VISIBLE);
+ tvPrivacyApp.setPaintFlags(tvPrivacyApp.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
+ tvPrivacyApp.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Helper.view(v.getContext(), Uri.parse(Helper.PRIVACY_URI), false);
}
});
diff --git a/app/src/main/java/eu/faircode/email/FragmentQuickSetup.java b/app/src/main/java/eu/faircode/email/FragmentQuickSetup.java
index ab057fa864..711095b80e 100644
--- a/app/src/main/java/eu/faircode/email/FragmentQuickSetup.java
+++ b/app/src/main/java/eu/faircode/email/FragmentQuickSetup.java
@@ -69,6 +69,7 @@ public class FragmentQuickSetup extends FragmentBase {
private ScrollView scroll;
private TextView tvPrivacy;
+ private TextView tvPrivacyApp;
private EditText etName;
private EditText etEmail;
private TextInputLayout tilPassword;
@@ -140,6 +141,7 @@ public class FragmentQuickSetup extends FragmentBase {
// Get controls
tvPrivacy = view.findViewById(R.id.tvPrivacy);
+ tvPrivacyApp = view.findViewById(R.id.tvPrivacyApp);
etName = view.findViewById(R.id.etName);
etEmail = view.findViewById(R.id.etEmail);
tilPassword = view.findViewById(R.id.tilPassword);
@@ -185,6 +187,14 @@ public class FragmentQuickSetup extends FragmentBase {
}
});
+ tvPrivacyApp.setPaintFlags(tvPrivacyApp.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
+ tvPrivacyApp.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Helper.view(v.getContext(), Uri.parse(Helper.PRIVACY_URI), false);
+ }
+ });
+
tilPassword.setHintEnabled(false);
tilPassword.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
diff --git a/app/src/main/res/layout/fragment_gmail.xml b/app/src/main/res/layout/fragment_gmail.xml
index faaad3e91b..186613d748 100644
--- a/app/src/main/res/layout/fragment_gmail.xml
+++ b/app/src/main/res/layout/fragment_gmail.xml
@@ -27,16 +27,32 @@
android:id="@+id/tvPrivacy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginStart="12dp"
android:layout_marginTop="6dp"
android:drawableEnd="@drawable/twotone_open_in_new_12"
android:drawablePadding="6dp"
- app:drawableTint="?android:attr/textColorLink"
android:text="@string/title_privacy_policy"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="?android:attr/textColorLink"
+ app:drawableTint="?android:attr/textColorLink"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvTitle" />
+
+
@@ -178,10 +194,10 @@
android:layout_marginTop="12dp"
android:drawableEnd="@drawable/twotone_open_in_new_24"
android:drawablePadding="6dp"
- app:drawableTint="?android:attr/textColorLink"
android:text="@string/title_setup_gmail_password"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="?android:attr/textColorLink"
+ app:drawableTint="?android:attr/textColorLink"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvOnDevice" />
@@ -217,10 +233,10 @@
android:backgroundTint="?attr/colorInfoBackground"
android:drawableEnd="@drawable/twotone_support_24"
android:drawablePadding="6dp"
- app:drawableTint="?attr/colorInfoForeground"
android:text="@string/menu_faq"
android:textColor="?attr/colorInfoForeground"
android:textStyle="bold"
+ app:drawableTint="?attr/colorInfoForeground"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvError" />
diff --git a/app/src/main/res/layout/fragment_oauth.xml b/app/src/main/res/layout/fragment_oauth.xml
index 241e696ad2..8558739839 100644
--- a/app/src/main/res/layout/fragment_oauth.xml
+++ b/app/src/main/res/layout/fragment_oauth.xml
@@ -37,6 +37,21 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvTitle" />
+
+
+
+