-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Use Material Desing 3 For File Actions Bottom Sheet #12058
Conversation
return binding.root | ||
} | ||
|
||
private fun applyTintedRoundedBackground() { |
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.
fine for now, mid-term we should move this to the common lib, i.e. https://github.com/nextcloud/android-common/blob/c9df82f2aec4dbd79d0ad2196dc8acdbf3496fc4/ui/src/main/java/com/nextcloud/android/common/ui/theme/utils/AndroidViewThemeUtils.kt
</androidx.core.widget.NestedScrollView> | ||
</LinearLayout> | ||
|
||
</LinearLayout> |
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.
lacks an empty line at the end
@@ -109,6 +109,8 @@ class FileActionsBottomSheet : BottomSheetDialogFragment(), Injectable { | |||
bottomSheetDialog.behavior.state = BottomSheetBehavior.STATE_EXPANDED | |||
bottomSheetDialog.behavior.skipCollapsed = true | |||
|
|||
viewThemeUtils.platform.colorViewBackground(binding.bottomSheet, ColorRole.SURFACE_VARIANT) |
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.
surface variant seems to be very high contrast, maybe use the same we use for dialog background?
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.
Indeed, it appears to be slightly darker. Regrettably, we are not providing a ColorRole for the dialog; instead, we are directly passing the dialog as an argument, and the common library applies the scheme internally.
I believe we may need to introduce an additional ColorRole or function for the bottomSheet within the viewThemeUtils.
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.
Yeah, the color roles are from the library implementation build by Google and they don't ship the color role for bottom sheets yet. But when I checked Google Drive bottom sheets and dialog where using the exact same color, so I expect it to be 2 different design tokens but ultimately the same color.
The reason for passing the dialog directly is that we wanted to have or move to mostly higher-level functions so devs don't need to know and choose color roles but have the common lib always choosing the appropriate ones.
@AndyScherzinger @tobiasKaminsky In pipiline these tests are failed but in my local machine all of it passed. |
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: Andy Scherzinger <[email protected]>
0b62666
to
f165db1
Compare
blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed. |
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/12058.apk |
Material Design 3 Bottom Sheet Example:
Before:
After:
STATE_EXPANDED bottom sheet behaviour can't have rounded corners. Official Source