Disable recycling, refactoring & fixes (#4705)

* Added tests for native view recycling
Disabled android native view recycling
Move toString from view-common to view-base
Fix crash on application restore and navigation back on API26
Added setAsRootView method
Added missing logo into perf-tests/recycling app

* additional fix for image-source-tests. ios is case sensitive.

* Add @private to some internal properties
Fix where padding is not respected when background is reset.
This commit is contained in:
Hristo Hristov
2017-08-17 09:15:35 +03:00
committed by GitHub
parent 2701ea3c1e
commit bba7a82bdf
18 changed files with 532 additions and 251 deletions

View File

@ -419,13 +419,7 @@ function findPageForFragment(fragment: android.app.Fragment, frame: Frame) {
return;
}
let entry: BackstackEntry;
if (frame._currentEntry && frame._currentEntry.fragmentTag === fragmentTag) {
entry = frame._currentEntry;
} else {
entry = frame.backStack.find((value) => value.fragmentTag === fragmentTag);
}
const entry = frame._findEntryForTag(fragmentTag);
const page = entry ? entry.resolvedPage : undefined;
if (page) {
const callbacks: FragmentCallbacksImplementation = fragment[CALLBACKS];
@ -668,7 +662,7 @@ class ActivityCallbacksImplementation implements AndroidActivityCallbacks {
this._rootView = rootView;
// Initialize native visual tree;
rootView._setupUI(activity);
rootView._setupAsRootView(activity);
activity.setContentView(rootView.nativeViewProtected, new org.nativescript.widgets.CommonLayoutParams());
// frameId is negative w
if (frame) {