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