update index.html and appicon

This commit is contained in:
Alexander Mahr 2025-01-05 23:02:44 +01:00
parent dc03b2fb46
commit 5aa56d9f5c
2 changed files with 8 additions and 11 deletions

View file

@ -15,9 +15,16 @@
opacity:1.0
}
}
button {
font-size:14mm;
}
</style>
<body>
<h1>Webview</h1>
<h2> clicking those buttons starts <a href="https://developer.android.com/reference/android/content/Intent">intents</a> to open those files</h2>
<button onclick="myJavaScriptInterface.startActivity('foto.jpg')">foto.jpg</button><br>
<button onclick="myJavaScriptInterface.startActivity('test.pdf')">test.pdf</button><br>
<button onclick="myJavaScriptInterface.startActivity('index.html')">index.html</button><br>
<script>
window.addEventListener("error",(error)=>{
document.body.innerHTML = "<h1>error</h1><pre>" +
@ -25,16 +32,6 @@ window.addEventListener("error",(error)=>{
"\nline:" + error.lineno +
"\n"+error.message +"</pre>";
},false);
window.addEventListener("load",()=>{
var count = localStorage.getItem("app-opened-count")|| 0;
count++;
localStorage.setItem("app-opened-count",count);
var h2 = document.createElement("h2");
h2.textContent = "Javascript works! (app was opened " + count + " times)";
h2.style.animation="wobble 1s ease-in-out 0s 1 forwards normal running"
document.body.appendChild(h2);
},false);
</script>
</body>
</html>

View file

@ -5,5 +5,5 @@
android:height="100dp">
<path
android:pathData="M95 50A45 45 0 0 1 5 50A45 45 0 0 1 95 50Z"
android:fillColor="#FF0000" />
android:fillColor="#00AA00" />
</vector>