Skip to content

Commit 0abfb14

Browse files
Hristo HristovHristo Hristov
authored andcommitted
Fix crash on API17 and API21-25
1 parent ac04ede commit 0abfb14

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

tests/app/ui/view/view-tests-common.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,6 @@ const customShortHandProperty = new ShorthandProperty<Style, string>({
280280
name: "customShortHand",
281281
cssName: "custom-short-hand",
282282
converter(value: string): [CssProperty<any, any>, any][] {
283-
console.log("Convert: " + value);
284283
const values = value.split(",");
285284
return [
286285
[customCssAProperty, values[0]],

tns-core-modules/ui/frame/fragment.transitions.android.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,11 @@ export function _onFragmentCreateAnimator(entry: ExpandedEntry, fragment: androi
204204

205205
if (!animator && sdkVersion() >= 21) {
206206
const view = fragment.getView();
207-
const parent = view.getParent();
207+
const jsParent = entry.resolvedPage.parent;
208+
const parent = view.getParent() || (jsParent && jsParent.nativeViewProtected);
208209
const animatedEntries = _getAnimatedEntries(entry.frameId);
209210
if (!animatedEntries || !animatedEntries.has(entry)) {
210-
if (!(<any>parent).isLaidOut()) {
211+
if (parent && !(<any>parent).isLaidOut()) {
211212
animator = enter ? entry.defaultEnterAnimator : entry.defaultExitAnimator;
212213
}
213214
}

tns-core-modules/ui/tab-view/tab-view.android.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ function initializeNativeClasses() {
185185
(<any>this.mCurTransaction).commitNowAllowingStateLoss();
186186
} else {
187187
this.mCurTransaction.commitAllowingStateLoss();
188+
this.owner._getFragmentManager().executePendingTransactions();
188189
}
189190

190191
this.mCurTransaction = null;

0 commit comments

Comments
 (0)