X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2FViewSslCertificate.java;h=2a81362a800f9f90d46a090eb8309b90774eea38;hp=8b370748ae7653555c08b6c6a8b4e15825c7ef1b;hb=0cb3e2266b503767b74535e794c674ea97773154;hpb=757139ad59282fb8400bc641a4be574e0b88de49 diff --git a/app/src/main/java/com/stoutner/privacybrowser/ViewSslCertificate.java b/app/src/main/java/com/stoutner/privacybrowser/ViewSslCertificate.java index 8b370748..2a81362a 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/ViewSslCertificate.java +++ b/app/src/main/java/com/stoutner/privacybrowser/ViewSslCertificate.java @@ -112,7 +112,7 @@ public class ViewSslCertificate extends DialogFragment { Date startDate = sslCertificate.getValidNotBeforeDate(); Date endDate = sslCertificate.getValidNotAfterDate(); - // Create a `SpannableStringBuilder` for each item. + // Create a `SpannableStringBuilder` for each `TextView` that needs multiple colors of text. SpannableStringBuilder issuedToCNameStringBuilder = new SpannableStringBuilder(cNameLabel + issuedToCNameString); SpannableStringBuilder issuedToONameStringBuilder = new SpannableStringBuilder(oNameLabel + issuedToONameString); SpannableStringBuilder issuedToUNameStringBuilder = new SpannableStringBuilder(uNameLabel + issuedToUNameString); @@ -125,8 +125,7 @@ public class ViewSslCertificate extends DialogFragment { // Create a blue `ForegroundColorSpan`. We have to use the deprecated `getColor` until API >= 23. ForegroundColorSpan blueColorSpan = new ForegroundColorSpan(getResources().getColor(R.color.blue)); - // Setup the spans to display the certificate information in blue. - // `SPAN_INCLUSIVE_INCLUSIVE` allows the span to grow in either direction. + // Setup the spans to display the certificate information in blue. `SPAN_INCLUSIVE_INCLUSIVE` allows the span to grow in either direction. issuedToCNameStringBuilder.setSpan(blueColorSpan, cNameLabel.length(), issuedToCNameStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE); issuedToONameStringBuilder.setSpan(blueColorSpan, oNameLabel.length(), issuedToONameStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE); issuedToUNameStringBuilder.setSpan(blueColorSpan, uNameLabel.length(), issuedToUNameStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);