user1355962
user1355962

Reputation: 11

How do I specify strike-through text style in Android?

Hi I want to write a word like "discount price" and cut it by straight line(not image) and write just below of "discount price" -> new discount price without cut it

Upvotes: 0

Views: 3799

Answers (1)

WojtekT
WojtekT

Reputation: 4775

Here's an example from: http://fupeg.blogspot.com/2010/01/strikethrough-android.html

TextView someLabel = (TextView) findViewById(R.id.some_label);
someLabel.setText(someDynamicString);
someLabel.setPaintFlags(someLabel.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);

Upvotes: 2

Related Questions