TextView tv = (TextView) findViewById(R.id.text); tv.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG); tv.setText("添加下划线");