Disable recycling of native views

createNativeView will set iOS nativeView if it is null/undefined
This commit is contained in:
Hristo Hristov
2017-03-28 18:08:39 +03:00
parent 84e726e6b9
commit e6250e718a
59 changed files with 112 additions and 97 deletions

View File

@@ -346,7 +346,10 @@ function printRunTestStats() {
messageContainer.focus();
page.style.fontSize = 11;
if (page.android) {
setTimeout(() => messageContainer.dismissSoftInput());
setTimeout(() => {
messageContainer.dismissSoftInput();
(<android.view.View>messageContainer.nativeView).scrollTo(0, 0);
});
}
}

View File

@@ -604,7 +604,7 @@ export function test_BindingToDictionaryAtAppLevel() {
pageViewModel.set("testProperty", testPropertyName);
const dict = {};
dict[testPropertyName] = expectedValue;
appModule.resources["dict"] = dict;
appModule.getResources()["dict"] = dict;
const testFunc = function (views: Array<View>) {
const testLabel = <Label>(views[0]);
@@ -629,7 +629,7 @@ export function test_BindingConverterCalledEvenWithNullValue() {
const testPropertyValue = null;
const expectedValue = "collapsed";
pageViewModel.set("testProperty", testPropertyValue);
appModule.resources["converter"] = function (value) {
appModule.getResources()["converter"] = function (value) {
if (value) {
return "visible";
} else {

View File

@@ -421,7 +421,7 @@ export class ListViewTest extends testModule.UITest<listViewModule.ListView> {
return result;
};
app.resources["dateConverter"] = dateConverter;
app.getResources()["dateConverter"] = dateConverter;
var data = new observableArray.ObservableArray();
data.push({ date: new Date(2020, 2, 7) });
@@ -542,7 +542,7 @@ export class ListViewTest extends testModule.UITest<listViewModule.ListView> {
return value;
}
app.resources["testConverter"] = testConverter;
app.getResources()["testConverter"] = testConverter;
var listViewModel = new observable.Observable();
listViewModel.set("items", [1, 2, 3]);
@@ -570,7 +570,7 @@ export class ListViewTest extends testModule.UITest<listViewModule.ListView> {
return value;
}
app.resources["testConverter"] = testConverter;
app.getResources()["testConverter"] = testConverter;
var listViewModel = new observable.Observable();
listViewModel.set("items", [1, 2, 3]);

View File

@@ -264,7 +264,7 @@ export function test_usingAppLevelConvertersInRepeaterItems() {
return result;
};
app.resources["dateConverter"] = dateConverter;
app.getResources()["dateConverter"] = dateConverter;
var data = new observableArray.ObservableArray();