Added $=sats to main script, css styling changes, trying to add logo to the left of the price, logo added in assets-images

This commit is contained in:
0ceanSlim 2023-07-29 20:55:06 -04:00
parent 05104acbe9
commit eb8ac849a0

View File

@ -26,6 +26,7 @@ class MainActivity : AppCompatActivity() {
// Load the HTML content from the "index.html" file // Load the HTML content from the "index.html" file
val htmlContent = try { val htmlContent = try {
// Load the HTML content from the "index.html" file
assets.open("index.html").bufferedReader().use { it.readText() } assets.open("index.html").bufferedReader().use { it.readText() }
} catch (e: IOException) { } catch (e: IOException) {
e.printStackTrace() e.printStackTrace()
@ -52,17 +53,17 @@ class MainActivity : AppCompatActivity() {
} }
// Combine the HTML, CSS, and JavaScript code // Combine the HTML, CSS, and JavaScript code
val finalHtmlContent = """ val finalHtmlContent = """
<html> <html>
<head> <head>
<style type="text/css">$cssCode</style> <style type="text/css">$cssCode</style>
</head> </head>
<body> <body>
$htmlContent $htmlContent
<script>$javaScriptCode</script> <script>$javaScriptCode</script>
</body> </body>
</html> </html>
""".trimIndent() """.trimIndent()
webView.loadDataWithBaseURL(null, finalHtmlContent, "text/html", "UTF-8", null) webView.loadDataWithBaseURL(null, finalHtmlContent, "text/html", "UTF-8", null)
} }