nativescript
インターフェースを実装する
サーチ…
NativescriptにView.OnLayoutChangeListenerを実装する
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();
}
}
});
surfaceViewを作成する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