Skip to content

Commit

Permalink
Merge branch 'mutual-learn-more' into 5.6-MAINT
Browse files Browse the repository at this point in the history
  • Loading branch information
cketti committed Mar 5, 2018
2 parents e178898 + 46048d2 commit e4e3fbc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public AutocryptPreferEncryptDialog(Context context, boolean preferEncryptEnable
@SuppressLint("InflateParams")
View contentView = inflater.inflate(R.layout.dialog_autocrypt_prefer_encrypt, null);

TextView learnMoreText = (TextView) contentView.findViewById(R.id.prefer_encrypt_learn_more);
makeTextViewLinksClickable(learnMoreText);

preferEncryptCheckbox = (CheckBox) contentView.findViewById(R.id.prefer_encrypt_check);
preferEncryptCheckbox.setChecked(preferEncryptEnabled);

Expand Down Expand Up @@ -66,4 +69,8 @@ private void toggleCheck() {
public interface OnPreferEncryptChangedListener {
void onPreferEncryptChanged(boolean enabled);
}

private void makeTextViewLinksClickable(TextView textView) {
textView.setMovementMethod(LinkMovementMethod.getInstance());
}
}
10 changes: 9 additions & 1 deletion k9mail/src/main/res/layout/dialog_autocrypt_prefer_encrypt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:paddingLeft="24dp"
android:paddingRight="24dp"
android:gravity="center_vertical"
Expand All @@ -52,6 +51,15 @@

</LinearLayout>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:layout_marginRight="24dp"
android:layout_marginBottom="20dp"
android:id="@+id/prefer_encrypt_learn_more"
android:text="@string/dialog_autocrypt_mutual_learn_more" />

</LinearLayout>

</ScrollView>
1 change: 1 addition & 0 deletions k9mail/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1289,4 +1289,5 @@ Please submit bug reports, contribute new features and ask questions at
<string name="dialog_autocrypt_mutual_title">Autocrypt mutual mode</string>
<string name="dialog_autocrypt_mutual_description_1">Messages will normally be encrypted by choice, or when replying to an encrypted message.</string>
<string name="dialog_autocrypt_mutual_description_2">If both sender and recipients enable mutual mode, encryption will be enabled by default.</string>
<string name="dialog_autocrypt_mutual_learn_more">You can <a href="https://k9mail.github.io/2018/02/26/OpenPGP-Considerations-Part-III-Autocrypt.html">click here</a> to learn more.</string>
</resources>

0 comments on commit e4e3fbc

Please sign in to comment.