material/Beiträge/MWS-Beitrag/Präsentation/Mobile.vrb

21 lines
514 B
Text
Raw Permalink Normal View History

\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}