javascript-mobile-app-template
Version:
Simple and fully customizable user interface template. Design for mobile app development on Capacitor or Cordova. Platforms: Android, iOS, Web.
61 lines (42 loc) • 1.79 kB
HTML
<html>
<head>
<title>UI Waiting View</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<link rel="stylesheet" type="text/css" href="basic/basic.min.css">
<script src="basic/basic.min.js" type="text/javascript" charset="utf-8"></script>
<script src="components/ui-core.js" type="text/javascript" charset="utf-8"></script>
<script src="components/ui-waiting-view.js" type="text/javascript" charset="utf-8"></script>
<script>
let waitingView;
var start = function() {
page.color = "#BE94CA";
// BUTTON: Show waiting.
page.btnAction = createButton(0, 40, "auto");
that.text = "Show Waiting";
that.color = "rgba(0, 0, 0, 0.1)";
that.textColor = "black"
that.spaceX = 20;
that.minimal = 1;
that.border = 1;
that.borderColor = "rgba(0, 0, 0, 0.3)"
that.onResize(function(self) {
self.center("left");
});
// UI WAITING VIEW: It prevents the user from touching the screen until the process is complete.
waitingView = WaitingView();
page.btnAction.onClick(function(self) {
waitingView.show();
setTimeout(function() {
// After the process is complete:
waitingView.hide();
}, 1500);
});
}
</script>
</head>
<body>
<!-- HTML content -->
</body>
</html>