20 lines
514 B
Text
20 lines
514 B
Text
\frametitle{API-Beispiel IIb}
|
|
\begin{lsthtml}[caption={webView-Beispiel, UI-Code}]
|
|
<html>
|
|
<head>
|
|
<script>
|
|
var droid = new Android();
|
|
var speak = function(){
|
|
droid.eventPost("say",document.getElementById("say").value);
|
|
}
|
|
</script>
|
|
[...]
|
|
</head>
|
|
<body>
|
|
<form onsubmit="speak(); return false;">
|
|
<input type="text" id="say" value="Test." />
|
|
<input type="submit" value="Sprich!" />
|
|
</form>
|
|
</body>
|
|
</html>
|
|
\end{lsthtml}
|