-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[Catalog][DatePicker] navigation bar has no contrast if edge to edge setting is on #4502
base: master
Are you sure you want to change the base?
[Catalog][DatePicker] navigation bar has no contrast if edge to edge setting is on #4502
Conversation
Fragment fragment = getChildFragmentManager().findFragmentByTag("MaterialDatePicker"); | ||
if (fragment instanceof MaterialDatePicker<?>) { | ||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { | ||
view.post(() -> { |
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.
Move the whole view.pose(....) part to a private method to avoid duplicated codes?
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.
Thank you. I created navigationBarContrast() method.
@@ -163,13 +166,30 @@ public View onCreateDemoView( | |||
builder.setCalendarConstraints(constraintsBuilder.build()); | |||
MaterialDatePicker<?> picker = builder.build(); | |||
addSnackBarListeners(picker); | |||
picker.show(getChildFragmentManager(), picker.toString()); | |||
picker.show(getChildFragmentManager(), "MaterialDatePicker"); |
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.
Why did you change picker.toString() to a string constant?
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.
I changed it to find the fragment by findFragmentByTag("MaterialDatePicker").
closes #4501