Fix HTML highlighting

* We need to "and" off the alpha bits from the Color constant

Change-Id: I2e30bd9df74fffed82c637c79927993a49447e23
This commit is contained in:
Marc Blank 2011-04-03 17:30:37 -07:00
parent c33054f9e4
commit 1e7e2829d8
1 changed files with 2 additions and 1 deletions

View File

@ -33,8 +33,9 @@ public class TextUtilities {
// Highlight color is yellow, as in other apps.
// TODO Push for this to be a global (style-related?) constant
private static final int HIGHLIGHT_COLOR_INT = Color.YELLOW;
// We AND off the "alpha" from the color (i.e. 0xFFFFFF00 -> 0x00FFFF00)
/*package*/ static final String HIGHLIGHT_COLOR_STRING =
'#' + Integer.toHexString(HIGHLIGHT_COLOR_INT);
'#' + Integer.toHexString(HIGHLIGHT_COLOR_INT & 0x00FFFFFF);
// This is how many chars we'll allow in a snippet
private static final int MAX_SNIPPET_LENGTH = 200;