- Original slide animation will be used for Widget.Design and unstyled Snackbars
- New fade + scale animation will be used for Widget.MaterialComponents Snackbars
PiperOrigin-RevId: 213669605
- Add liftOnScrollTargetViewId attribute to allow client to specify the scrolling view that should be listened to for updating AppBarLayout lifted state.
- Use View#canScrollVertically instead of View#getScrollY to determine lifted state.
PiperOrigin-RevId: 213614055
This was due to FloatingToolbar using <Button> for its layouts in API 23-25, which got automatically inflated to <MaterialButton> via the custom view inflater in MDC themes. However, the default MaterialButton styling (especially backgroundTint) was overriding the styling in the <Button>, resulting in a broken FloatingToolbar. This issue was not encountered on API 24/25 since there were likely theme/style changes in those versions that override this Button. From API 26 onwards, FloatingToolbar uses a TextView and ImageView instead of Button.
PiperOrigin-RevId: 213517896
- Fixes materialThemeOverlay case where client is not using our theme or style (e.g., AppCompat + component with no style set)
- Also refactors createThemedContext() to use obtainStyledAttributes with defStyleAttr and defStyleRes instead of getTheme().resolveAttribute()
PiperOrigin-RevId: 213464594
Anti-aliasing the Paint by default eliminates the appearance of jagged edges and corners.
Anti-aliasing is currently supported by calling setPaintFlags() on MaterialShapeDrawable, but it is not yet enabled by default.
PiperOrigin-RevId: 212709536
This removes duplication between the 2 implementations and automatically fixes font loading bug in CollapsingToolbarLayout & TextInputLayout. It has a side effect of changing font loading from sync to async but it shouldn't affect anyone since font loading wasn't really working in the first place. It may affect the UIs that were affected by the original bug though.
To alleviate possible "font flickering" due to async loading, CollapsingTextHelper defers the TextPaint changes until the font is actually loaded.
Another scenario the async loading would have an impact on is when the font is manually overwritten with CollapsingTextHelper.setTypeface() while async op is still ongoing. The result of async load would then overwrite the font back to the originally requested. This happens in TextInputLayout which overwrites its own font setting to this of its child whenever its added. This may happen before async op completes. To guard against that, any direct font setting automatically cancels the async load (cancels == ignores the result when it comes).
PiperOrigin-RevId: 212328671
Avoid setting custom ExploreByTouchHelper as delegate in pre-N unless there's a close/trailing icon. This is necessary to workaround a Talkback bug.
PiperOrigin-RevId: 211490101
Rather than just setting the FloatingActionButton to be invisible, we should actually perform the translation transformation on it. This is necessary to allow for other views which may be watching for transformations (such as the BAB) to update.
PiperOrigin-RevId: 211080287
Before this change, MaterialShapeDrawable incorrectly handled ColorStateLists. Only the color defined "last" in a ColorStateList was used. This is because MaterialShapeDrawable was not properly updating and handling state changes. This change fixes the issue by updating the tint filter appropriately and overriding some methods which should have been overridden.
PiperOrigin-RevId: 210779870
Before this change, MaterialShapeDrawable did not draw with respect to InsetDrawables. The problem was that MaterialShapeDrawable was using the Canvas to determine where to draw, rather than the bounds. This change reworks MaterialShapeDrawable to use the bounds to calculate and draw the shape's path, rather than the Canvas.
PiperOrigin-RevId: 210724227