mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fix crash on API17 and API21-25
This commit is contained in:
@@ -280,7 +280,6 @@ const customShortHandProperty = new ShorthandProperty<Style, string>({
|
||||
name: "customShortHand",
|
||||
cssName: "custom-short-hand",
|
||||
converter(value: string): [CssProperty<any, any>, any][] {
|
||||
console.log("Convert: " + value);
|
||||
const values = value.split(",");
|
||||
return [
|
||||
[customCssAProperty, values[0]],
|
||||
|
||||
@@ -204,10 +204,11 @@ export function _onFragmentCreateAnimator(entry: ExpandedEntry, fragment: androi
|
||||
|
||||
if (!animator && sdkVersion() >= 21) {
|
||||
const view = fragment.getView();
|
||||
const parent = view.getParent();
|
||||
const jsParent = entry.resolvedPage.parent;
|
||||
const parent = view.getParent() || (jsParent && jsParent.nativeViewProtected);
|
||||
const animatedEntries = _getAnimatedEntries(entry.frameId);
|
||||
if (!animatedEntries || !animatedEntries.has(entry)) {
|
||||
if (!(<any>parent).isLaidOut()) {
|
||||
if (parent && !(<any>parent).isLaidOut()) {
|
||||
animator = enter ? entry.defaultEnterAnimator : entry.defaultExitAnimator;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,6 +185,7 @@ function initializeNativeClasses() {
|
||||
(<any>this.mCurTransaction).commitNowAllowingStateLoss();
|
||||
} else {
|
||||
this.mCurTransaction.commitAllowingStateLoss();
|
||||
this.owner._getFragmentManager().executePendingTransactions();
|
||||
}
|
||||
|
||||
this.mCurTransaction = null;
|
||||
|
||||
Reference in New Issue
Block a user