Replies: 1 comment 1 reply
-
Hi! for android you can do: import { onMounted } from "nativescript-vue";
import { alert, Utils } from "@nativescript/core";
onMounted(() => {
let resultInPixel = 0;
const resourceId = Utils.android
.getResources()
.getIdentifier("status_bar_height", "dimen", "android");
if (resourceId > 0) {
resultInPixel = Utils.android
.getResources()
.getDimensionPixelSize(resourceId);
}
const resultDIP = Utils.layout.toDeviceIndependentPixels(resultInPixel);
alert("result is " + resultInPixel + " " + resultDIP);
}); |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I need to get the height of the status bar from andoird, I use Native Script Vue (js), chat GPT suggests that I get it from a module that does not have this function. Is there any working suggestion on how to get the height of the bar status?
Beta Was this translation helpful? Give feedback.
All reactions