@nativescript/types-android
Advanced tools
Changelog
8.8.1 (2024-07-12)
_setupAsRootView
(#10554) (88a0472)sys://
support for SF Symbol usage on images with effects (#10555) (d678915)Changelog
8.7.0 (2024-04-08)
buildPath
support (#10477) (4293284)Changelog
8.6.1 (2023-11-02)
Changelog
8.6.0 (2023-10-10)
Utils.dismissKeyboard()
not working with modal (#10375) (6d44c2d)Changelog
8.5.0 (2023-03-28)
Potential issue:
error TS2339: Property 'newValue' does not exist on type 'EventData'.
2611 if (e.newValue) {
Possible causes:
Application.on(Application.orientationChangedEvent, (event) => {
Solution:
Application.on(Application.orientationChangedEvent, (event: OrientationChangedEventData) => {
This means that potentially if you were using margins to position, for example on font icon labels, they may appear mis-positioned intially after updating. You should be able to remove custom margin handling to simplify.
Transition
class:animateIOSTransition(containerView: UIView, fromView: UIView, toView: UIView, operation: UINavigationControllerOperation, completion: (finished: boolean) => void): void {
toView.transform = CGAffineTransformMakeScale(0, 0);
fromView.transform = CGAffineTransformIdentity;
switch (operation) {
case UINavigationControllerOperation.Push:
containerView.insertSubviewAboveSubview(toView, fromView);
break;
case UINavigationControllerOperation.Pop:
containerView.insertSubviewBelowSubview(toView, fromView);
break;
}
var duration = this.getDuration();
var curve = this.getCurve();
UIView.animateWithDurationAnimationsCompletion(
duration,
() => {
UIView.setAnimationCurve(curve);
toView.transform = CGAffineTransformIdentity;
fromView.transform = CGAffineTransformMakeScale(0, 0);
},
completion
);
}
animateIOSTransition(transitionContext: UIViewControllerContextTransitioning, fromViewCtrl: UIViewController, toViewCtrl: UIViewController, operation: UINavigationControllerOperation): void {
const toView = toViewCtrl.view;
const fromView = fromViewCtrl.view;
toView.transform = CGAffineTransformMakeScale(0, 0);
fromView.transform = CGAffineTransformIdentity;
switch (operation) {
case UINavigationControllerOperation.Push:
transitionContext.containerView.insertSubviewAboveSubview(toView, fromView);
break;
case UINavigationControllerOperation.Pop:
transitionContext.containerView.insertSubviewBelowSubview(toView, fromView);
break;
}
var duration = this.getDuration();
var curve = this.getCurve();
UIView.animateWithDurationAnimationsCompletion(
duration,
() => {
UIView.setAnimationCurve(curve);
toView.transform = CGAffineTransformIdentity;
fromView.transform = CGAffineTransformMakeScale(0, 0);
},
(finished) => {
transitionContext.completeTransition(finished);
}
);
}
deref
instead of the deprecated get
API. In 8.4, iOS allowed usage of deref
but Android still required get
. With 8.5 you can now use deref
the same everywhere.Incorrect:
// collection: NSArray
for (var i = 0; i < collection.count; i++) {
const obj = collection[i];
Correct:
// collection: NSArray
for (var i = 0; i < collection.count; i++) {
const obj = collection.objectAtIndex(i);
Changelog
8.4.0 (2022-11-30)
startActivity
(#10062) (f3a5c16)SDK_VERSION
(#10097) (c957b48)Changelog
8.3.0 (2022-07-14)
inBackground
and suspended
(#9897) (8987bab)navigatingToEvent
event.entry, the backstackEntry
object is now returned which has an entry
property on it if you still need it.