Mohammadsharif Rahimi
Mohammadsharif Rahimi

Reputation: 11

How to get EditText values and show them as a html file in a Web view?

How I can get the EditText values and show values as a html file in a Web view? Please help me. Very thanks.

Upvotes: 0

Views: 175

Answers (1)

Diego Torres Milano
Diego Torres Milano

Reputation: 69368

You don't need any file if what you want is to show the value in the WebView. Use:

mWebView.loadData("<html><body>text: <b>" + mEditText.getText().toString() + "</b></body></html>", "text/html", null);

Upvotes: 1

Related Questions