Skip to content
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

[MaterialTimePicker] Buttons at the bottom are getting cut off #3584

Open
mck182 opened this issue Sep 15, 2023 · 1 comment · May be fixed by #3588
Open

[MaterialTimePicker] Buttons at the bottom are getting cut off #3584

mck182 opened this issue Sep 15, 2023 · 1 comment · May be fixed by #3588

Comments

@mck182
Copy link

mck182 commented Sep 15, 2023

Description: MaterialTimePicker is getting its buttons cut off
at the bottom in the 1.11.x releases, this looks correct in 1.10.0-beta01
so it may be a regression.

I suspect this might improve if those two buttons are also constrained
to parent at their bottom edge.

Expected behavior: The expected behaviour is that those buttons
would not be clipped. Here are two screenshots - one from 1.10 and
one from 1.11, notice how the dialog's height is less than it was in 1.10
and the buttons are clipped:

1.10 1.11
Screenshot_1694795666 Screenshot_1694795666 copy

Source code: material_timepicker_dialog.xml; This may be due to
commit d10201d which updated the layout

Minimal sample app repro: n/a

Android API version: 33

Material Library version: 1.11.0-alpha02

Device: Pixel 6 emulator

To help us triage faster, please check to make sure you are using the latest version of the library.

We also happily accept pull requests.

@mateuszkwiecinski
Copy link

I confirm this bug made into "stable" 1.11.0 release and the buttons are now drawn outside dialog bounds

image

In my case it got caught with espresso test:

androidx.test.espresso.base.AssertionErrorHandler$AssertionFailedWithCauseError: '(view has effective visibility <VISIBLE> and view.getGlobalVisibleRect() covers at least <100> percent of the view's area)' doesn't match the selected view.
Expected: (view has effective visibility <VISIBLE> and view.getGlobalVisibleRect() covers at least <100> percent of the view's area)
Got: view was <95> percent visible to the user
View Details: MaterialButton{id=2131297131, res-name=material_timepicker_ok_button, visibility=VISIBLE, width=224, height=168, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=896.0, y=1575.0, text=OK, input-type=0, ime-target=false, has-links=false, is-checked=false}

at dalvik.system.VMStack.getThreadStackTrace(Native Method)
at java.lang.Thread.getStackTrace(Thread.java:1538)
at androidx.test.espresso.base.AssertionErrorHandler.handleSafely(AssertionErrorHandler.java:3)
at androidx.test.espresso.base.AssertionErrorHandler.handleSafely(AssertionErrorHandler.java:1)
at androidx.test.espresso.base.DefaultFailureHandler$TypedFailureHandler.handle(DefaultFailureHandler.java:4)
at androidx.test.espresso.base.DefaultFailureHandler.handle(DefaultFailureHandler.java:5)
at androidx.test.espresso.ViewInteraction.waitForAndHandleInteractionResults(ViewInteraction.java:5)
at androidx.test.espresso.ViewInteraction.check(ViewInteraction.java:12)
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment