Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

WebView Javascript User Input

$
0
0

Hello,

I currently have a WebView that get the user location for loading the Google Maps Library.
All my HTML + JavaScript code is declared inside a string called "html" and is used in the webview.LoadData function.

WebView _webview = FindViewById (Resource.Id.webView1);
_webview.LoadData (html, "text/html", null);

Up to this point everything is working and the user is shown a list of locations, but I dont know how to get the value of a specific location that the user chooses.

Example:
The user get a list of places:
Place 1 - Bar
Place 2 - Restaurant
Place 3 - Restaurant
Place 4 - School

Whenever he clicks on "Place 1", i would receive this data and return to my c# code and assign the name "Place 1" to a local variable.

Any idea on what to do?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>