Added app privacy policy link

pull/214/head
M66B 1 year ago
parent 3e772c063e
commit 4e3c2379b2

@ -76,6 +76,7 @@ public class FragmentGmail extends FragmentBase {
private TextView tvTitle; private TextView tvTitle;
private TextView tvPrivacy; private TextView tvPrivacy;
private TextView tvPrivacyApp;
private Button btnGrant; private Button btnGrant;
private TextView tvGranted; private TextView tvGranted;
private EditText etName; private EditText etName;
@ -122,6 +123,7 @@ public class FragmentGmail extends FragmentBase {
// Get controls // Get controls
tvTitle = view.findViewById(R.id.tvTitle); tvTitle = view.findViewById(R.id.tvTitle);
tvPrivacy = view.findViewById(R.id.tvPrivacy); tvPrivacy = view.findViewById(R.id.tvPrivacy);
tvPrivacyApp = view.findViewById(R.id.tvPrivacyApp);
btnGrant = view.findViewById(R.id.btnGrant); btnGrant = view.findViewById(R.id.btnGrant);
tvGranted = view.findViewById(R.id.tvGranted); tvGranted = view.findViewById(R.id.tvGranted);
etName = view.findViewById(R.id.etName); 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() { btnGrant.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {

@ -114,6 +114,7 @@ public class FragmentOAuth extends FragmentBase {
private TextView tvTitle; private TextView tvTitle;
private TextView tvPrivacy; private TextView tvPrivacy;
private TextView tvPrivacyApp;
private EditText etName; private EditText etName;
private EditText etEmail; private EditText etEmail;
private EditText etTenant; private EditText etTenant;
@ -171,6 +172,7 @@ public class FragmentOAuth extends FragmentBase {
// Get controls // Get controls
tvTitle = view.findViewById(R.id.tvTitle); tvTitle = view.findViewById(R.id.tvTitle);
tvPrivacy = view.findViewById(R.id.tvPrivacy); tvPrivacy = view.findViewById(R.id.tvPrivacy);
tvPrivacyApp = view.findViewById(R.id.tvPrivacyApp);
etName = view.findViewById(R.id.etName); etName = view.findViewById(R.id.etName);
etEmail = view.findViewById(R.id.etEmail); etEmail = view.findViewById(R.id.etEmail);
etTenant = view.findViewById(R.id.etTenant); etTenant = view.findViewById(R.id.etTenant);
@ -196,12 +198,23 @@ public class FragmentOAuth extends FragmentBase {
// Wire controls // Wire controls
tvPrivacy.setVisibility(TextUtils.isEmpty(privacy) ? View.GONE : View.VISIBLE);
tvPrivacy.setPaintFlags(tvPrivacy.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG); tvPrivacy.setPaintFlags(tvPrivacy.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
tvPrivacy.setOnClickListener(new View.OnClickListener() { tvPrivacy.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { 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);
} }
}); });

@ -69,6 +69,7 @@ public class FragmentQuickSetup extends FragmentBase {
private ScrollView scroll; private ScrollView scroll;
private TextView tvPrivacy; private TextView tvPrivacy;
private TextView tvPrivacyApp;
private EditText etName; private EditText etName;
private EditText etEmail; private EditText etEmail;
private TextInputLayout tilPassword; private TextInputLayout tilPassword;
@ -140,6 +141,7 @@ public class FragmentQuickSetup extends FragmentBase {
// Get controls // Get controls
tvPrivacy = view.findViewById(R.id.tvPrivacy); tvPrivacy = view.findViewById(R.id.tvPrivacy);
tvPrivacyApp = view.findViewById(R.id.tvPrivacyApp);
etName = view.findViewById(R.id.etName); etName = view.findViewById(R.id.etName);
etEmail = view.findViewById(R.id.etEmail); etEmail = view.findViewById(R.id.etEmail);
tilPassword = view.findViewById(R.id.tilPassword); 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.setHintEnabled(false);
tilPassword.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() { tilPassword.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {

@ -27,16 +27,32 @@
android:id="@+id/tvPrivacy" android:id="@+id/tvPrivacy"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="6dp" android:layout_marginTop="6dp"
android:drawableEnd="@drawable/twotone_open_in_new_12" android:drawableEnd="@drawable/twotone_open_in_new_12"
android:drawablePadding="6dp" android:drawablePadding="6dp"
app:drawableTint="?android:attr/textColorLink"
android:text="@string/title_privacy_policy" android:text="@string/title_privacy_policy"
android:textAppearance="@style/TextAppearance.AppCompat.Small" android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="?android:attr/textColorLink" android:textColor="?android:attr/textColorLink"
app:drawableTint="?android:attr/textColorLink"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvTitle" /> app:layout_constraintTop_toBottomOf="@id/tvTitle" />
<TextView
android:id="@+id/tvPrivacyApp"
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"
android:text="@string/app_name"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="?android:attr/textColorLink"
app:drawableTint="?android:attr/textColorLink"
app:layout_constraintStart_toEndOf="@id/tvPrivacy"
app:layout_constraintTop_toBottomOf="@id/tvTitle" />
<TextView <TextView
android:id="@+id/tvGrantHint" android:id="@+id/tvGrantHint"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -162,11 +178,11 @@
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:drawableEnd="@drawable/twotone_open_in_new_24" android:drawableEnd="@drawable/twotone_open_in_new_24"
android:drawablePadding="6dp" android:drawablePadding="6dp"
app:drawableTint="?android:attr/textColorLink"
android:text="@string/title_setup_gmail_on_device" android:text="@string/title_setup_gmail_on_device"
android:textAppearance="@style/TextAppearance.AppCompat.Small" android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="?android:attr/textColorLink" android:textColor="?android:attr/textColorLink"
android:visibility="gone" android:visibility="gone"
app:drawableTint="?android:attr/textColorLink"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvSelectHint" /> app:layout_constraintTop_toBottomOf="@id/tvSelectHint" />
@ -178,10 +194,10 @@
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:drawableEnd="@drawable/twotone_open_in_new_24" android:drawableEnd="@drawable/twotone_open_in_new_24"
android:drawablePadding="6dp" android:drawablePadding="6dp"
app:drawableTint="?android:attr/textColorLink"
android:text="@string/title_setup_gmail_password" android:text="@string/title_setup_gmail_password"
android:textAppearance="@style/TextAppearance.AppCompat.Small" android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="?android:attr/textColorLink" android:textColor="?android:attr/textColorLink"
app:drawableTint="?android:attr/textColorLink"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvOnDevice" /> app:layout_constraintTop_toBottomOf="@id/tvOnDevice" />
@ -217,10 +233,10 @@
android:backgroundTint="?attr/colorInfoBackground" android:backgroundTint="?attr/colorInfoBackground"
android:drawableEnd="@drawable/twotone_support_24" android:drawableEnd="@drawable/twotone_support_24"
android:drawablePadding="6dp" android:drawablePadding="6dp"
app:drawableTint="?attr/colorInfoForeground"
android:text="@string/menu_faq" android:text="@string/menu_faq"
android:textColor="?attr/colorInfoForeground" android:textColor="?attr/colorInfoForeground"
android:textStyle="bold" android:textStyle="bold"
app:drawableTint="?attr/colorInfoForeground"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvError" /> app:layout_constraintTop_toBottomOf="@id/tvError" />

@ -37,6 +37,21 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvTitle" /> app:layout_constraintTop_toBottomOf="@id/tvTitle" />
<TextView
android:id="@+id/tvPrivacyApp"
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"
android:text="@string/app_name"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="?android:attr/textColorLink"
app:drawableTint="?android:attr/textColorLink"
app:layout_constraintStart_toEndOf="@id/tvPrivacy"
app:layout_constraintTop_toBottomOf="@id/tvTitle" />
<eu.faircode.email.EditTextPlain <eu.faircode.email.EditTextPlain
android:id="@+id/etName" android:id="@+id/etName"
android:layout_width="0dp" android:layout_width="0dp"

@ -37,6 +37,21 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvTitle" /> app:layout_constraintTop_toBottomOf="@id/tvTitle" />
<TextView
android:id="@+id/tvPrivacyApp"
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"
android:text="@string/app_name"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="?android:attr/textColorLink"
app:drawableTint="?android:attr/textColorLink"
app:layout_constraintStart_toEndOf="@id/tvPrivacy"
app:layout_constraintTop_toBottomOf="@id/tvTitle" />
<eu.faircode.email.EditTextPlain <eu.faircode.email.EditTextPlain
android:id="@+id/etName" android:id="@+id/etName"
android:layout_width="0dp" android:layout_width="0dp"

Loading…
Cancel
Save