Skip to content

Conversation

@RafalOzogJudopay
Copy link
Contributor

@RafalOzogJudopay RafalOzogJudopay commented Nov 25, 2025

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
Screenshot 2025-11-25 at 13 29 57

After:
Video: demoAfter.webm
Screenshot_1764077457

android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:fitsSystemWindows="true">
Copy link
Contributor Author

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.

@RafalOzogJudopay RafalOzogJudopay force-pushed the CT-3129-payment-methods-landscape-insets branch from 53b8998 to 7476ed0 Compare November 25, 2025 13:23
@RafalOzogJudopay RafalOzogJudopay force-pushed the CT-3129-payment-methods-landscape-insets branch from 0b37ddf to bc7e994 Compare November 25, 2025 13:34
@RafalOzogJudopay RafalOzogJudopay force-pushed the CT-3129-payment-methods-landscape-insets branch from 253602e to b4572e8 Compare November 25, 2025 13:44
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
9 Security Hotspots
10.6% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant