String msg = <table><tr><td> <b>Some text here</ b ></ td ></ tr ></ table >;
EditText txtMsg = (EditText) findViewById(R.id.txtMessage);
txtMsg.setText(Html.fromHtml(msg));
其中txtMsg
是在我写的HTML标签,但它给我简单的文字,我希望它在Android的HTML格式的字符串。显示HTML内容在EDITTEXT Android中
请您澄清一下'HTML格式'是什么意思? – Aniruddha 2014-09-11 12:25:48
你想让文字显示为粗体吗? – 2014-09-11 12:39:49
Html格式表示可以在edittext中动态设置的内容。 – shripal 2014-09-11 12:58:28