creating a strikethrough text?

前端 未结 11 922
借酒劲吻你
借酒劲吻你 2020-11-30 17:36

Can I create a strikethrough text in Android, I mean adding a special value in the TextView tag that can make this possible?



        
11条回答
  •  暖寄归人
    2020-11-30 18:36

    Just use this and you are done . For Activity :

    TextView t= (TextView).findViewById(R.id.thousand));
    t.setPaintFlags(t.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);
    

    For Xml :

    
    
                
    
                 
    
    

提交回复
热议问题