I'm displaying formatted text in an EditText as such:
String msg = <b>Some text here</b>;
EditText txtMsg = (EditText) findViewById(R.id.txtMessage);
txtMsg.setText(Html.fromHtml(msg));
That displays in the EditText as "Some text here." Then, later, I'd like to pull the text from that EditText complete with the tags. However, when I use:
txtMsg.getText().toString();
It just gives me "Some text here" with no formatting.
Any thoughts on this?
Try as to get Text with HTML formatting back from EditText:
String msgtext=Html.toHtml(txtMsg.getText());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With