(widthMeasureSpec: number, heightMeasureSpec: number)
| 94 | } |
| 95 | |
| 96 | public measure(widthMeasureSpec: number, heightMeasureSpec: number): void { |
| 97 | const measureSpecsChanged = this._setCurrentMeasureSpecs(widthMeasureSpec, heightMeasureSpec); |
| 98 | if (this.nativeViewProtected && (this.isLayoutRequested || measureSpecsChanged)) { |
| 99 | // first clears the measured dimension flag |
| 100 | this._privateFlags &= ~PFLAG_MEASURED_DIMENSION_SET; |
| 101 | |
| 102 | // measure ourselves, this should set the measured dimension flag back |
| 103 | this.onMeasure(widthMeasureSpec, heightMeasureSpec); |
| 104 | this._privateFlags |= PFLAG_LAYOUT_REQUIRED; |
| 105 | |
| 106 | // flag not set, setMeasuredDimension() was not invoked, we trace |
| 107 | // the exception to warn the developer |
| 108 | if ((this._privateFlags & PFLAG_MEASURED_DIMENSION_SET) !== PFLAG_MEASURED_DIMENSION_SET) { |
| 109 | if (Trace.isEnabled()) { |
| 110 | Trace.write('onMeasure() did not set the measured dimension by calling setMeasuredDimension() ' + this, Trace.categories.Layout, Trace.messageType.error); |
| 111 | } |
| 112 | } |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | @profile |
| 117 | public layout(left: number, top: number, right: number, bottom: number, setFrame = true): void { |
no test coverage detected