简体   繁体   中英

How can I get entered text from Android WebView and use it in my code

I have a WebView that has a textfield in it, in which the user enters some text. On a button press I want to extract this text from the WebView and store it in a String so that I can use it later in some other native code.

Note: This text entry must be done in a WebView, and cannot be moved to an EditText.

You need to get access to the function behind the button (ie the webview you're accessing has to provide it)

Basically, this post will help you accomplish what you're looking for : https://stackoverflow.com/a/9581016/4232337

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM