-
Notifications
You must be signed in to change notification settings - Fork 4
CT-3129 Payment Methods Landscape Insets #324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| android:layout_width="match_parent" | ||
| android:layout_height="match_parent" | ||
| android:background="@color/white" | ||
| android:fitsSystemWindows="true"> |
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.
We already are setting this on outer layer, which is appBar in payment_methods_fragment.
53b8998 to
7476ed0
Compare
0b37ddf to
bc7e994
Compare
253602e to
b4572e8
Compare
|




1. Fixes insets in Payment Methods landscape mode.
Background (in case of no payment method state), and app bar horizontal line stretch to the very edges, as the background should, but the content respects insets (has correct margins).
2. Fixed PM collapsing toolbar behaviour in landscape.
I have simplified previously made solution that was calculating min height for toolbar (in landscape) as percentage of the screen height. It wasn't working well for all screen sizes and fonts, sometimes certain elements were overlapping, sometimes hidden on some screens, sometimes not (collapsing is controlled by Android through the CollapsingToolbarLayout).
Instead I simplified it to the fixed height dimen (as we have in portrait), but added offsetChangeListener (in PMFragment), which is ensuring that in landscape, certain elements are hidden when the toolbar is collapsed.
3. Works if we rotate screen either left or right.
Demo:
Before:

Video: demoBefore.webm
After:

Video: demoAfter.webm