(widthMeasureSpec: number, heightMeasureSpec: number)
| 174 | |
| 175 | @profile |
| 176 | public onMeasure(widthMeasureSpec: number, heightMeasureSpec: number): void { |
| 177 | const view = this.nativeViewProtected; |
| 178 | const width = layout.getMeasureSpecSize(widthMeasureSpec); |
| 179 | const widthMode = layout.getMeasureSpecMode(widthMeasureSpec); |
| 180 | |
| 181 | const height = layout.getMeasureSpecSize(heightMeasureSpec); |
| 182 | const heightMode = layout.getMeasureSpecMode(heightMeasureSpec); |
| 183 | |
| 184 | let nativeWidth = 0; |
| 185 | let nativeHeight = 0; |
| 186 | if (view) { |
| 187 | const nativeSize = layout.measureNativeView(view, width, widthMode, height, heightMode); |
| 188 | nativeWidth = nativeSize.width; |
| 189 | nativeHeight = nativeSize.height; |
| 190 | } |
| 191 | |
| 192 | const measureWidth = Math.max(nativeWidth, this.effectiveMinWidth); |
| 193 | const measureHeight = Math.max(nativeHeight, this.effectiveMinHeight); |
| 194 | |
| 195 | const widthAndState = View.resolveSizeAndState(measureWidth, width, widthMode, 0); |
| 196 | const heightAndState = View.resolveSizeAndState(measureHeight, height, heightMode, 0); |
| 197 | |
| 198 | this.setMeasuredDimension(widthAndState, heightAndState); |
| 199 | } |
| 200 | |
| 201 | public onLayout(left: number, top: number, right: number, bottom: number): void { |
| 202 | // |
no test coverage detected