I am creating a BottonShet component in Nativescript-Vue. The problem I have is the following:
Uploading the frame using translateY or animation behaves differently on iOS and Android.
I have a component:
In the botton sheet I have an element that is 150 high. If I apply a
frame.translateY = Screen.mainScreen.heightDIPs - 150
in android it reaches a high and in ios it reaches another. What's going on here? How can I calculate a height so that it is the same in all phones from 150 and the screen height?
In this documentation it says that the translate of the animation is measured in DIPs so this should work well on all devices.
In the mentioned tutorial, it makes an if to apply one height or another depending on the platform, I don't want that, I want to be able to calculate so I don't have to be testing on all devices.
Thanks a lot.
question from:
https://stackoverflow.com/questions/65877361/nativescript-translatey-different-on-android-and-ios 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…