We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd7de3d commit 0f18d90Copy full SHA for 0f18d90
lib/java/com/google/android/material/tabs/TabLayout.java
@@ -1567,7 +1567,7 @@ protected void onDraw(@NonNull Canvas canvas) {
1567
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
1568
// If we have a MeasureSpec which allows us to decide our height, try and use the default
1569
// height
1570
- final int idealHeight = (int) ViewUtils.dpToPx(getContext(), getDefaultHeight());
+ final int idealHeight = Math.round(ViewUtils.dpToPx(getContext(), getDefaultHeight()));
1571
switch (MeasureSpec.getMode(heightMeasureSpec)) {
1572
case MeasureSpec.AT_MOST:
1573
if (getChildCount() == 1 && MeasureSpec.getSize(heightMeasureSpec) >= idealHeight) {
0 commit comments