UNPKG

cordova-mobile-app-template

Version:

Simple and fully customizable user interface template. Design for mobile app development on Apache Cordova framework or Ionic / Capacitor Native Runtime. Platforms: Android, iOS.

58 lines (40 loc) 1.67 kB
<!DOCTYPE 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="library/basic.min.css"> <script src="library/basic.min.js" type="text/javascript" charset="utf-8"></script> <script src="js/component/ui-waiting-view.js" type="text/javascript" charset="utf-8"></script> <script> 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.create(); page.btnAction.onClick(function(self) { waitingView.show(); setTimeout(function() { // After the process is complete: waitingView.hide(); }, 1500); }); } </script> </head> <body> <!-- HTML content --> </body> </html>