您的位置:首页 > Web前端 > HTML

将资产文件中的html纯文字放到TextView中

2016-07-22 16:37 330 查看
TextView tvUserAgreement = (TextView)findViewById(R.id.tvUserAgreement);
try {
InputStream inputStream = getAssets().open("user_agreement.html");
String agreementStr = IOUtils.toString(inputStream);
tvUserAgreement.setText(Html.fromHtml(agreementStr));
} catch (Exception e) {
e.printStackTrace();
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: