mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 22:01:42 +08:00
fix(flexbox-ios): resolve text size issue for ListView with flexbox layout template (#5799)
* fix(flexbox-layout-ios): resolve text size issue for ListView with flexbox template * fix(flexbox-layout-ios): resolve text size issue for ListView
This commit is contained in:

committed by
Dimitar Topuzov

parent
7851629a27
commit
a03065c527
@ -820,7 +820,17 @@ export class FlexboxLayout extends FlexboxLayoutBase {
|
||||
private _stretchViewVertically(view: View, crossSize: number) {
|
||||
let newHeight = crossSize - view.effectiveMarginTop - view.effectiveMarginBottom;
|
||||
newHeight = Math.max(newHeight, 0);
|
||||
view.measure(makeMeasureSpec(view.getMeasuredWidth(), EXACTLY), makeMeasureSpec(newHeight, EXACTLY));
|
||||
let originalMeasuredWidth = view.getMeasuredWidth();
|
||||
let childWidthMeasureSpec = FlexboxLayout.getChildMeasureSpec(this._currentWidthMeasureSpec,
|
||||
view.effectivePaddingLeft + view.effectivePaddingRight + view.effectiveMarginLeft
|
||||
+ view.effectiveMarginRight, view.effectiveWidth < 0 ? WRAP_CONTENT : Math.min(view.effectiveWidth, originalMeasuredWidth));
|
||||
|
||||
view.measure(childWidthMeasureSpec, makeMeasureSpec(newHeight, EXACTLY));
|
||||
|
||||
if (originalMeasuredWidth > view.getMeasuredWidth()) {
|
||||
childWidthMeasureSpec = makeMeasureSpec(originalMeasuredWidth, EXACTLY);
|
||||
view.measure(childWidthMeasureSpec, makeMeasureSpec(newHeight, EXACTLY));
|
||||
}
|
||||
}
|
||||
|
||||
private _stretchViewHorizontally(view: View, crossSize: number) {
|
||||
|
Reference in New Issue
Block a user