Java Code Examples for android.text.TextPaint#setStrikeThruText()

The following examples show how to use android.text.TextPaint#setStrikeThruText() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TextDecorationSpan.java    From ucar-weex-core with Apache License 2.0 6 votes vote down vote up
@Override
public void updateDrawState(TextPaint tp) {
  switch (mTextDecoration) {
    case LINETHROUGH:
      tp.setUnderlineText(false);
      tp.setStrikeThruText(true);
      break;
    case UNDERLINE:
      tp.setUnderlineText(true);
      tp.setStrikeThruText(false);
      break;
    case NONE:
      tp.setUnderlineText(false);
      tp.setStrikeThruText(false);
      break;
  }
}
 
Example 2
Source File: LinkSpan.java    From Dashchan with Apache License 2.0 6 votes vote down vote up
@Override
public void updateDrawState(TextPaint paint) {
	if (paint.getColor() != Color.TRANSPARENT) {
		if (hidden) {
			paint.setColor(foregroundColor & 0x00ffffff | Color.argb(Color.alpha(foregroundColor) / 2, 0, 0, 0));
			paint.setStrikeThruText(true);
		} else {
			paint.setColor(foregroundColor);
		}
		paint.setUnderlineText(true);
		if (clicked) {
			paint.bgColor = Color.alpha(paint.bgColor) == 0x00 ? clickedColor
					: GraphicsUtils.mixColors(paint.bgColor, clickedColor);
		}
	}
}
 
Example 3
Source File: StrikethroughSpan.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
@Override
public void updateDrawState(@NonNull TextPaint ds) {
    ds.setStrikeThruText(true);
}
 
Example 4
Source File: StrikethroughSpan.java    From PowerFileExplorer with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void updateDrawState(TextPaint ds) {
	ds.setStrikeThruText(true);
}
 
Example 5
Source File: Utils_String.java    From AsteroidOSSync with GNU General Public License v3.0 4 votes vote down vote up
@Override public void updateDrawState(TextPaint tp)
{
	tp.setColor(0xFFFF0000);
	tp.setStrikeThruText(true);
}
 
Example 6
Source File: Strike.java    From Ruisi with Apache License 2.0 4 votes vote down vote up
@Override
public void updateDrawState(TextPaint tp) {
    tp.setStrikeThruText(true);
}
 
Example 7
Source File: StrikethroughSpan.java    From JotaTextEditor with Apache License 2.0 4 votes vote down vote up
@Override
public void updateDrawState(TextPaint ds) {
	ds.setStrikeThruText(true);
}
 
Example 8
Source File: Utils_String.java    From SweetBlue with GNU General Public License v3.0 4 votes vote down vote up
@Override public void updateDrawState(TextPaint tp)
{
	tp.setColor(0xFFFF0000);
	tp.setStrikeThruText(true);
}