nativescript
реализовать интерфейс
Поиск…
реализовать View.OnLayoutChangeListener в Nativescript
let playerLayoutChangeListener = new android.view.View.OnLayoutChangeListener( {
onLayoutChange : function ( v:View, left:number, top:number, right:number, bottom:number, oldLeft:number, oldTop:number, oldRight:number, oldBottom:number):any {
if (left != oldLeft || top != oldTop || right != oldRight || bottom != oldBottom) {
console.log("OnLayoutChangeListener");
__this.changeSurfaceLayout();
}
}
});
создать поверхностьView http://stackoverflow.com/documentation/proposed/changes/79536
Добавить прослушиватель:
surfaceView.addOnLayoutChangeListener(playerLayoutChangeListener);
удалить прослушиватель:
surfaceView.removeOnLayoutChangeListener(playerLayoutChangeListener);
Modified text is an extract of the original Stack Overflow Documentation
Лицензировано согласно CC BY-SA 3.0
Не связан с Stack Overflow