mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-26 03:01:51 +08:00
Layouts are now implemented natively for Android.
This commit is contained in:
@ -47,6 +47,7 @@ export class ContentView extends view.CustomLayoutView implements definition.Con
|
||||
}
|
||||
}
|
||||
|
||||
// This method won't be called in Android because we use the native android layout.
|
||||
public onMeasure(widthMeasureSpec: number, heightMeasureSpec: number): void {
|
||||
var result = view.View.measureChild(this, this.content, widthMeasureSpec, heightMeasureSpec);
|
||||
|
||||
@ -66,6 +67,7 @@ export class ContentView extends view.CustomLayoutView implements definition.Con
|
||||
this.setMeasuredDimension(widthAndState, heightAndState);
|
||||
}
|
||||
|
||||
// This method won't be called in Android because we use the native android layout.
|
||||
public onLayout(left: number, top: number, right: number, bottom: number): void {
|
||||
view.View.layoutChild(this, this.content, 0, 0, right - left, bottom - top);
|
||||
}
|
||||
|
Reference in New Issue
Block a user