WebView text formatting



  • Server returns the html mark, I pass it through TextUtils.htmlEncode

    Question, how do we keep the text open?

    Either Encoder is red, and they follow it straight to the webView?

    введите сюда описание изображения



  • Encoder is extra. In fact, if you want to paint just a piece of marking, not a full html page, you can use it. TextView:

    myTextView.setText(Html.fromHtml("<h2>Title</h2><br><p>Description here</p>"));
    



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2