原文链接地址
1. TextView tv=new TextView(this); tv.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG);//下划线 tv.setText("使用代码实现下划线样式"); tv.setTextColor(Color.WHITE); 2. tv=new TextView(this); tv.setText(Html.fromHtml("<u>使用html实现下划线样式</u>"));
原文链接地址
1. TextView tv=new TextView(this); tv.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG);//下划线 tv.setText("使用代码实现下划线样式"); tv.setTextColor(Color.WHITE); 2. tv=new TextView(this); tv.setText(Html.fromHtml("<u>使用html实现下划线样式</u>"));