-
Notifications
You must be signed in to change notification settings - Fork 1.3k
For #14980 - Effectively disable tabs tray STATE_HALF_EXPANDED #16052
For #14980 - Effectively disable tabs tray STATE_HALF_EXPANDED #16052
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The patch looks great, could we add test to verify the feature and avoid future regressions? :)
I tried to but I think I'm gonna need some pointers. |
There is a failing |
Codecov Report
@@ Coverage Diff @@
## master #16052 +/- ##
============================================
- Coverage 29.97% 29.97% -0.01%
+ Complexity 1203 1202 -1
============================================
Files 451 451
Lines 18463 18466 +3
Branches 2541 2542 +1
============================================
Hits 5535 5535
- Misses 12500 12503 +3
Partials 428 428
Continue to review full report at Codecov.
|
STATE_HALF_EXPANDED cannot be disabled while also keeping fitToContents = true based on which the tabs tray layout is currently set. To work around this we'll set a a minuscule height for the tab tray when in this state and then immediately advance to STATE_HIDDEN so to make it imperceptible to the users. Since I couldn't write unit tests because of InflateExceptions in Robolectric I've write UI tests to protect against regressions.
Added some UI tests for the changes here if unit testing doesn't work. |
Sure! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this PR will also fix #13777, thanks!
STATE_HALF_EXPANDED cannot be disabled while also keeping fitToContents = true
based on which the tabs tray layout is currently set.
To work around this we'll set a a minuscule height for the tab tray when in this
state and then immediately advance to STATE_HIDDEN so to make it imperceptible
to the users.
video
Pull Request checklist
To download an APK when reviewing a PR: