By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,302 Members | 1,788 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,302 IT Pros & Developers. It's quick & easy.

Android Studio: Copy textbox entry to webview page form

P: 116

I am trying to write a basic app in Android Studio (my first attempt).

I have an EditText field for a username and one for a password plus a button. I also have a WebView which will contain a webpage with a login form.

Since I'd like to keep the actual webpage hidden (as it is a mess on a phone device), I'd like to be able to type into the app form and have the app button transfer the data to the web elements and force a submit of the web form.

In VB it is done as follows - how would it be done in Android Studio?

Expand|Select|Wrap|Line Numbers
  1. userelm = myWebBrowser.Document.GetElementById("username")
  2. passelm = myWebBrowser.Document.GetElementById("password")
  3. userelm.InnerText = myUser.Text
  4. passelm.InnerText = myPassword.Text
  5. myWebBrowser.Document.GetElementById("login").InvokeMember("Click")
Many thanks!
Jul 17 '15 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.