fixed exchange drawing over rest of app when keyboard is pulled up
This commit is contained in:
parent
33cc212922
commit
86706f60e1
@ -1 +1 @@
|
|||||||
SatWorth
|
Sats Monitor
|
@ -11,8 +11,8 @@ android {
|
|||||||
applicationId = "com.example.satworth"
|
applicationId = "com.example.satworth"
|
||||||
minSdk = 24
|
minSdk = 24
|
||||||
targetSdk = 33
|
targetSdk = 33
|
||||||
versionCode = 4
|
versionCode = 5
|
||||||
versionName = "0.1.6"
|
versionName = "0.1.61"
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
15
app/src/main/assets/scripts/transformExchange.js
Normal file
15
app/src/main/assets/scripts/transformExchange.js
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
let initialHeight = window.innerHeight;
|
||||||
|
|
||||||
|
function adjustExchangePosition() {
|
||||||
|
const currentHeight = window.innerHeight;
|
||||||
|
const heightDifference = initialHeight - currentHeight;
|
||||||
|
const exchangeElement = document.getElementById('exchange');
|
||||||
|
|
||||||
|
if (heightDifference > 0) {
|
||||||
|
exchangeElement.style.transform = `translate(0, ${heightDifference}px)`;
|
||||||
|
} else {
|
||||||
|
exchangeElement.style.transform = 'translate(0, 0)';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener('resize', adjustExchangePosition);
|
@ -7,7 +7,7 @@ body {
|
|||||||
font-family: monospace, Arial;
|
font-family: monospace, Arial;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-feature-settings: normal;
|
font-feature-settings: normal;
|
||||||
overflow-x: hidden;
|
overflow: hidden;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,9 +120,9 @@ a:hover {
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
position: fixed;
|
||||||
bottom: 10px;
|
bottom: 10px;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
position: fixed;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* CSS for the text */
|
/* CSS for the text */
|
||||||
|
@ -36,7 +36,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val assetManager = assets
|
val assetManager = assets
|
||||||
val scriptFiles = listOf("scripts/viewBitcoinPrice.js", "scripts/viewFiatToSats.js", "scripts/selectCurrency.js", "scripts/calcSatsToFiat.js")
|
val scriptFiles = listOf("scripts/viewBitcoinPrice.js", "scripts/viewFiatToSats.js", "scripts/selectCurrency.js", "scripts/calcSatsToFiat.js","scripts/transformExchange.js")
|
||||||
|
|
||||||
val scriptContents = scriptFiles.map { fileName ->
|
val scriptContents = scriptFiles.map { fileName ->
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user