方法如下
TextView textview = (TextView) findViewById(R.id.textview1); Paint paint = textview.getPaint(); paint.setFlags(Paint.STRIKE_THRU_TEXT_FLAG); paint.setAntiAlias(true);
轉回來
TextView textview = (TextView) findViewById(R.id.textview1); Paint paint = textview.getPaint(); paint.setFlags(Paint.ANTI_ALIAS_FLAG); paint.setAntiAlias(true);
參考網址:
http://jiun-blog.blogspot.tw/2012/06/android-textview-line-through.html
沒有留言:
張貼留言