Added DeepL privacy policy link

pull/209/head
M66B 2 years ago
parent facaaf5a6a
commit 9a6703105f

@ -76,7 +76,8 @@ public class DeepL {
private static final int DEEPL_TIMEOUT = 20; // seconds
private static final String PLAN_URI = "https://www.deepl.com/pro-account/plan";
private static final String PRIVACY_URI = "https://www.deepl.com/privacy/";
static final String PRIVACY_URI = "https://www.deepl.com/privacy/";
// curl https://api-free.deepl.com/v2/languages \
// -d auth_key=... \

@ -117,6 +117,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
private TextView tvLanguageToolPrivacy;
private ImageButton ibLanguageTool;
private SwitchCompat swDeepL;
private TextView tvDeepLPrivacy;
private ImageButton ibDeepL;
private SwitchCompat swVirusTotal;
private TextView tvVirusTotalPrivacy;
@ -305,6 +306,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
tvLanguageToolPrivacy = view.findViewById(R.id.tvLanguageToolPrivacy);
ibLanguageTool = view.findViewById(R.id.ibLanguageTool);
swDeepL = view.findViewById(R.id.swDeepL);
tvDeepLPrivacy = view.findViewById(R.id.tvDeepLPrivacy);
ibDeepL = view.findViewById(R.id.ibDeepL);
swVirusTotal = view.findViewById(R.id.swVirusTotal);
tvVirusTotalPrivacy = view.findViewById(R.id.tvVirusTotalPrivacy);
@ -615,6 +617,14 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
}
});
tvDeepLPrivacy.getPaint().setUnderlineText(true);
tvDeepLPrivacy.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Helper.view(v.getContext(), Uri.parse(DeepL.PRIVACY_URI), true);
}
});
swDeepL.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {

@ -366,14 +366,29 @@
app:layout_constraintTop_toBottomOf="@id/ibLanguageTool"
app:switchPadding="12dp" />
<TextView
android:id="@+id/tvDeepLPrivacy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:drawableEnd="@drawable/twotone_open_in_new_12"
android:drawablePadding="6dp"
android:drawableTint="?android:attr/textColorLink"
android:text="@string/title_privacy_policy"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="?android:attr/textColorLink"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swDeepL" />
<ImageButton
android:id="@+id/ibDeepL"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:contentDescription="@string/title_info"
android:tooltipText="@string/title_info"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swDeepL"
app:layout_constraintTop_toBottomOf="@id/tvDeepLPrivacy"
app:srcCompat="@drawable/twotone_info_24" />
<androidx.appcompat.widget.SwitchCompat

Loading…
Cancel
Save