Make the CutoutDrawable draw itself in the correct bounds when in RTL mode. This involves changing CollapsingTextHelper#getCollapsedTextActualBounds to return bounds that account for RTL.
PiperOrigin-RevId: 185916657
Set cutout bounds in onLayout to make sure that they're set by the time the first draw happens. This fixes an issue where the CutoutDrawable was drawn with incorrect bounds if setText was called on the TextInputEditText before it was laid out, by ensuring that the cutout bounds are set before the first draw pass.
PiperOrigin-RevId: 185877643
Adds an itemIconSize attribute, setters, getters, and tests to BottomNavigationView, as well as a Catalog demo for icon size with a slider.
PiperOrigin-RevId: 185609075
Separate attributes allows components to directly reference a color in the tonal palette in its resources.
Otherwise, the implications of these attributes is the same as the previous color arrays.
PiperOrigin-RevId: 184764971
And add attributes to it.
None of these attributes were in widget's public_attrs, with the exception of menu. I'm not removing menu from widget's public_attrs, since NavigationView also uses that attribute.
Related side note: Before the package migration for bottomnavigation, BottomNavigationView used attributes declared by NavigationView, but for the package move, I made them standalone attributes to avoid creating circular dependencies. After cl/183574402 goes in, I'm going to consider making bottomnavigation depend on navigationview, and using NavigationView's attrs for BottomNavigationView.
PiperOrigin-RevId: 184201928
Move the call to invalidate() to happen after the box attributes are applied to the text box instead of once the attribute value is assigned to its field. This also required moving the call to applyBoxAttributes() from draw() for performance reasons, since applyBoxAttributes() was asking to be redrawn from inside the draw method.
This fixes the broken change color button in the text fields demo. Before, it only changed the color once drawableStateChanged() was called - now, it changes immediately.
PiperOrigin-RevId: 184138044
Update ThemeEnforcement to read this new attribute, and check for Material theme.
Change the ThemeEnforcement API to replace Context#obtainStyledAttributes().
See followup CL for how this attribute is used.
PiperOrigin-RevId: 184074635
This commit creates a tabs package for resources related to tabs. It does not move TabLayout to this package, since that would break current users.
PiperOrigin-RevId: 183893754
Previously, Theme.Design inherited from Theme.MaterialComponents, which would have resulted in an automatic update to Theme.MaterialComponents. Now, users will have to opt in to Theme.MaterialComponents to get the new theme.
Also add in DesignTheme attributes that were deleted and attributes that were set in Theme.Design*.
PiperOrigin-RevId: 183716471
And update bottomnavigation/build.gradle.
Also removes attribute dependencies on NavigationView, in order to avoid circular dependencies and/or creating a new package for NavigationView.
This is in preparation for adding a component style attr for bottom nav.
PiperOrigin-RevId: 183435857
This fixes BottomSheetBehavior implementation and remove uses of
deprecated APIs. The APIs are mainly about nested scrolling related to
inertia scrolling by nested fling.
This CL does not change the behavior. The inertia scrolling by nested
fling is not enabled. For that, we will have to change the way we use
ViewDragHelper, and let nested fling handle the inertia scrolling.
Bug: 70912761
Test: Existing tests (BottomSheetBehaviorTest, BottomSheetDialogTest)
Change-Id: Iaea50056ed253131c7920f703136d30e73918756
PiperOrigin-RevId: 183276945