Loading core/java/android/widget/TabWidget.java +6 −3 Original line number Diff line number Diff line Loading @@ -172,6 +172,11 @@ public class TabWidget extends LinearLayout implements OnFocusChangeListener { @Override void measureHorizontal(int widthMeasureSpec, int heightMeasureSpec) { if (MeasureSpec.getMode(widthMeasureSpec) == MeasureSpec.UNSPECIFIED) { super.measureHorizontal(widthMeasureSpec, heightMeasureSpec); return; } // First, measure with no constraint final int unspecifiedWidth = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED); mImposedTabsHeight = -1; Loading Loading @@ -208,10 +213,8 @@ public class TabWidget extends LinearLayout implements OnFocusChangeListener { } // Measure again, this time with imposed tab widths and respecting initial spec request if (mImposedTabsHeight >= 0 || unspecifiedWidth != widthMeasureSpec) { super.measureHorizontal(widthMeasureSpec, heightMeasureSpec); } } /** * Returns the tab indicator view at the given index. Loading Loading
core/java/android/widget/TabWidget.java +6 −3 Original line number Diff line number Diff line Loading @@ -172,6 +172,11 @@ public class TabWidget extends LinearLayout implements OnFocusChangeListener { @Override void measureHorizontal(int widthMeasureSpec, int heightMeasureSpec) { if (MeasureSpec.getMode(widthMeasureSpec) == MeasureSpec.UNSPECIFIED) { super.measureHorizontal(widthMeasureSpec, heightMeasureSpec); return; } // First, measure with no constraint final int unspecifiedWidth = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED); mImposedTabsHeight = -1; Loading Loading @@ -208,10 +213,8 @@ public class TabWidget extends LinearLayout implements OnFocusChangeListener { } // Measure again, this time with imposed tab widths and respecting initial spec request if (mImposedTabsHeight >= 0 || unspecifiedWidth != widthMeasureSpec) { super.measureHorizontal(widthMeasureSpec, heightMeasureSpec); } } /** * Returns the tab indicator view at the given index. Loading