disable recycling on specific button (#4527)

* disable recycling on specific button
add more thorough test for view recycling
fix memory leak with android ActionBar
improve padding reset when view is recycled
improve reset of several controls

* stopping local animations when view is recycled
fix tns-ios version in tests/package.json

* Fix isClickable on android when reusing nativeView
This commit is contained in:
Hristo Hristov
2017-07-11 09:48:08 +03:00
committed by Alexander Vakrilov
parent f092a6ecae
commit 09535627b9
15 changed files with 203 additions and 59 deletions

View File

@ -69,6 +69,14 @@ export class Slider extends SliderBase {
super.disposeNativeView();
}
public resetNativeView(): void {
super.resetNativeView();
const nativeView = this.nativeView;
nativeView.setMax(100);
nativeView.setProgress(0);
nativeView.setKeyProgressIncrement(1);
}
/**
* There is no minValue in Android. We simulate this by subtracting the minValue from the native value and maxValue.
* We need this method to call native setMax and setProgress methods when minValue property is changed,
@ -132,4 +140,4 @@ export class Slider extends SliderBase {
[backgroundInternalProperty.setNative](value: Background) {
//
}
}
}