add strike through text for revoked or expired keys and disable views for revoked keys as well

This commit is contained in:
uberspot
2014-03-26 14:06:40 +02:00
parent 438c050250
commit 8d23ba968a
2 changed files with 27 additions and 10 deletions

View File

@@ -17,18 +17,14 @@
package org.sufficientlysecure.keychain.helper;
import android.graphics.Color;
import android.os.Bundle;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.text.style.ForegroundColorSpan;
import android.text.Spanned;
import android.text.style.StrikethroughSpan;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.util.Log;
import java.security.DigestException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Iterator;
import java.util.Set;
@@ -65,4 +61,10 @@ public class OtherHelper {
}
}
public static SpannableStringBuilder strikeOutText(CharSequence text) {
SpannableStringBuilder sb = new SpannableStringBuilder(text);
sb.setSpan(new StrikethroughSpan(), 0, text.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
return sb;
}
}