strikethrough

Is there an easy way to strike through text in an app widget?

无人久伴 提交于 2019-11-26 12:03:15
I was wondering if there is an easy way to strike text within an app widget in Android. In a normal activity, it is pretty easy, using textview flags: textView.setPaintFlags(textView.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG); But since in an app widget, I can use only remoteviews... I do not know if this is possible Anyone know something about this? Thanks! You can use this: remoteviews.setInt(R.id.YourTextView, "setPaintFlags", Paint.STRIKE_THRU_TEXT_FLAG | Paint.ANTI_ALIAS_FLAG); Of course you can also add other flags from the android.graphics.Paint class. To do it programatically in a

Linethrough/strikethrough a whole HTML table row

自古美人都是妖i 提交于 2019-11-26 09:28:29
问题 After some research, I couldn\'t find an answer to this question. There was this but it didn\'t really answer my question. I would like to \"strikethrough\" a complete HTML table row in CSS, not just the text in it. Is it at all possible? From the example that I linked, it seems tr styling doesn\'t even work in Firefox. (And anyway, text-decoration only applies on text afaik) 回答1: Oh yes, yes it is! CSS: table { border-collapse: collapse; } td { position: relative; padding: 5px 10px; } tr

UILabel with text struck through

白昼怎懂夜的黑 提交于 2019-11-26 08:47:22
问题 I want to create a UILabel in which the text is like this How can I do this? When the text is small, the line should also be small. 回答1: SWIFT CODE let attributeString: NSMutableAttributedString = NSMutableAttributedString(string: "Your Text") attributeString.addAttribute(NSStrikethroughStyleAttributeName, value: 2, range: NSMakeRange(0, attributeString.length)) then: yourLabel.attributedText = attributeString To make some part of string to strike then provide range let somePartStringRange =

Is there an easy way to strike through text in an app widget?

坚强是说给别人听的谎言 提交于 2019-11-26 02:49:43
问题 I was wondering if there is an easy way to strike text within an app widget in Android. In a normal activity, it is pretty easy, using textview flags: textView.setPaintFlags(textView.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG); But since in an app widget, I can use only remoteviews... I do not know if this is possible Anyone know something about this? Thanks! 回答1: You can use this: remoteviews.setInt(R.id.YourTextView, "setPaintFlags", Paint.STRIKE_THRU_TEXT_FLAG | Paint.ANTI_ALIAS_FLAG);