Open adil-hussain-84 opened 4 years ago
Hi @adil-hussain-84 thank you for providing the sample apps, I don't have a Moto G8 plus device on hand, is this bug reproducible in an emulator?
@wcshi: Sadly, no. The only device that I've experienced it on yet is the Moto G8 Plus device, but that may be because I have a limited number of devices to hand. I have tried it in landscape on Android 10 and Android 11 emulators created with the Pixel 2 and Pixel 3 device definitions but I've not been able to replicate the issue there.
Is the issue still reproducible? If this only happens on a certain device/sdk combination it may not be Material library's issue.
Yes, the TabLayoutExperiments/app1 application module still demonstrates the issue despite updating both the build tools and libraries in the module to the latest versions.
The devices that I have to hand are the Google Pixel 4a, Moto E6 Plus, Moto G8 Plus and Galaxy Tab A7. Out of these, only the Moto G8 Plus demonstrates the issue.
Description: A
TabLayout
which has atabMode
value offixed
and atabGravity
value offill
(as in the layout file here) results in the first tab rendering with a width of264dp
on some devices rather than its natural width, as this screenshot demonstrates.Expected behavior: The first tab should have a natural width like the other two tabs in the
TabLayout
rather than a width of264dp
(which, curiously, is the value of thedesign_tab_max_width
dimension in thecom.google.android.material:material
library).Source code: See this minimal Android application which demonstrates the problem.
Android API version: Android 10
Material Library version: 1.2.1
Device: Moto G8 Plus landscape orientation