How can I do that?
public class ActivityTest extends Activity {
public EditText edtText;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.test);
WebView webView = (WebView) findViewById(R.id.webView);
webView.loadUrl("file:///android_res/raw/htmlimages.html");
webView.addJavascriptInterface(new MyTest(), "Scripts");
webView.getSettings().setJavaScriptEnabled(true);
webView.setWebChromeClient(new WebChromeClient());
edtText = (EditText) findViewById(R.id.edtText22);
you can use fromHtml
method Like this :
String styledText = "This is <font color='red'>simple</font>.";
textView.setText(Html.fromHtml(styledText));
In your case to change EditText call this.edtText.setText("What you want...")
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