代码设置
方式1:
TextView mTv = findViewById(R.id.tv);
mTv .getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG);
mTv .getPaint().setAntiAlias(true);//抗锯齿
方式2:
TextView textView = findViewById(R.id.textView);
textView.setText( Html.fromHtml("<u>"+"010101"+"</u>"));
布局设置:
<string name="personal"><u>点击查看如何获取积分</u></string>