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

The following are Jave code examples for showing how to use setStrikeThruText() of the android.text.TextPaint class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: ucar-weex-core   File: TextDecorationSpan.java   Source Code and License Vote up 6 votes
@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
Project: RNLearn_Project1   File: FontStylingSpan.java   Source Code and License Vote up 5 votes
@Override
public void updateDrawState(TextPaint ds) {
  if (!Double.isNaN(mTextColor)) {
    ds.setColor((int) mTextColor);
  }

  ds.bgColor = mBackgroundColor;
  ds.setUnderlineText(mHasUnderline);
  ds.setStrikeThruText(mHasStrikeThrough);
  updateMeasureState(ds);
}
 
Example 3
Project: RNLearn_Project1   File: FontStylingSpan.java   Source Code and License Vote up 5 votes
@Override
public void updateDrawState(TextPaint ds) {
  if (!Double.isNaN(mTextColor)) {
    ds.setColor((int) mTextColor);
  }

  ds.bgColor = mBackgroundColor;
  ds.setUnderlineText(mHasUnderline);
  ds.setStrikeThruText(mHasStrikeThrough);
  updateMeasureState(ds);
}