hunterstich
8be3efc199
[BottomAppBar] Updated FAB Alignement and menu replacement to fix different length menu res translation x bug
...
PiperOrigin-RevId: 326652655
2020-08-14 15:08:25 -04:00
marianomartin
555356b03f
Internal cleanup
...
PiperOrigin-RevId: 318134343
2020-06-26 14:06:52 -04:00
hunterstich
d4a5702319
[BottomAppBar] Update menu replacement animation to coordinate with fab alignment animation.
...
When calling both setFabAlignmentMode and replaceMenu, the fab alignment animation and menu animation were not properly coordinating. replaceMenu causes a call to onLayout, which immediately updates the menu's translationX, causeing the menu to jump to its final position. This adds a condition to skip the menu position update if a menu animatior is running.
Additionally, the menu's contents were immediately being swapped making the animation look jumpy. This CL also as a method to update the fab alignment and menu resource at the same time so a coordinated animation of: fab scale out/slide start - > menu fade out -> menu replaced -> menu fade in -> fab scale/slide finish, can be run.
PiperOrigin-RevId: 316860005
2020-06-17 18:37:51 -07:00
Material Design Team
76ffe35fef
Cleanup
...
PiperOrigin-RevId: 313865830
2020-06-01 16:52:06 -04:00
cketcham
246b56faef
Prevent the FAB from being moved up when anchored to BottomAppBar
...
PiperOrigin-RevId: 293211000
2020-02-04 17:33:39 -05:00
cketcham
6e340c49d4
Fix BottomAppBarTopEdgeTreatment bug caused by large negative vertical offset
...
While some small negative values for vertical offset do work, this use case is currently not supported. Most negative values result in the cutout being drawn incorrectly. This also adds a new exception to help clarify the crash in the future.
Resolves https://github.com/material-components/material-components-android/issues/906
PiperOrigin-RevId: 292148159
2020-01-29 16:15:04 -05:00
Material Design Team
6405635df4
Handle horizontal system insets for BottomAppBar.
...
Previously only the bottom inset (navigation bar) would add extra padding to the BottomAppBar which avoided overlapping with the bottom inset when drawing edge-to-edge. A problem arises if the device is rotated horizontally. The FAB (or sometimes the ActionMenuView in RtL layouts) would overlap with the right inset, making usage impossible.
This CL adjusts the FAB and ActionMenuView X translations when necessary to avoid the horizontal system insets. Two new stylable attributes have been added to enable/disable this behavior, analogous to the existing attribute for bottom padding.
PiperOrigin-RevId: 286419669
2019-12-19 15:45:44 -05:00
cketcham
67491fca21
Add paddingBottomSystemWindowInsets to public attrs and update documentation
...
PiperOrigin-RevId: 281120848
2019-11-19 10:28:31 -08:00
cketcham
b9f8ee94b3
Adding option to enable and disable bottom inset padding for BottomAppBar
...
Resolves https://github.com/material-components/material-components-android/issues/580
This adds the paddingBottomSystemWindowInsets attribute which is a databinding extension that will probably be part of https://github.com/chrisbanes/insetter
PiperOrigin-RevId: 277139485
2019-11-01 13:28:40 -07:00
marianomartin
115313c0c0
Expose a class for themeoverlay in style
...
This moves functionality from ThemeEnforcement into a stand alone class.
Resolves https://github.com/material-components/material-components-android/issues/665
PiperOrigin-RevId: 275481343
2019-10-21 10:24:19 -04:00
cketcham
10c0f62972
Fix FAB placement relative to the BottomAppBar when system insets change
...
PiperOrigin-RevId: 274158808
2019-10-21 10:19:14 -04:00
marianomartin
215a839598
Internal cleanup
...
PiperOrigin-RevId: 267504117
2019-09-12 13:48:16 -04:00
cketcham
7bb525ff59
Update usages of ShapeAppearanceModel to use Builder pattern
...
PiperOrigin-RevId: 266144471
2019-08-29 15:39:51 -04:00
cketcham
89026898dc
Fix ActionMenuView position in RTL for BottomAppBar
...
PiperOrigin-RevId: 265997768
2019-08-29 15:35:04 -04:00
marianomartin
0d4515cb46
Internal cleanup
...
PiperOrigin-RevId: 265971745
2019-08-29 14:59:20 -04:00
cketcham
06b15017f6
Add @NonNull and @Nullable annotations
...
PiperOrigin-RevId: 264851045
2019-08-26 11:39:59 -04:00
connieshi
5a20fb0d4d
Rename TransformationListener to TransformationCallback.
...
PiperOrigin-RevId: 259827772
2019-07-25 13:12:10 -04:00
isabellekim
a628bf516b
Revert the library to compile with Java 7: revert lambdas, add necessary casts, and make some variables final.
...
Continue compile shrine demo, catalog, and tests with Java 8.
PiperOrigin-RevId: 257874888
2019-07-15 19:19:23 -04:00
marianomartin
152f05adbc
Internal cleanup
...
PiperOrigin-RevId: 256180803
2019-07-03 14:09:17 -04:00
cketcham
c6c4ec4849
Fix FAB insets when anchored to BAB.
...
PiperOrigin-RevId: 256167953
2019-07-03 14:08:08 -04:00
marianomartin
164bf0fabd
Internal cleanup
...
PiperOrigin-RevId: 255609320
2019-07-03 14:02:53 -04:00
marianomartin
ad8003d8e9
Internal cleanup
...
PiperOrigin-RevId: 255441067
2019-07-03 13:56:54 -04:00
dniz
5df3bebd63
Update elevation overlays to be based absolute elevation, factoring in the elevation of all parent views
...
Will follow-up with TabLayout absolute elevation separately
Resolves https://github.com/material-components/material-components-android/issues/381
PiperOrigin-RevId: 255404830
2019-07-03 13:55:49 -04:00
marianomartin
367b295624
Internal cleanup
...
PiperOrigin-RevId: 254414602
2019-06-24 17:12:42 -04:00
Material Design Team
b23d8058c3
Automated g4 rollback of changelist 253789519
...
PiperOrigin-RevId: 253856871
2019-06-24 16:47:11 -04:00
cketcham
d81cea337a
Fix FAB insets when anchored to BAB.
...
PiperOrigin-RevId: 253789519
2019-06-18 13:55:37 -04:00
cketcham
bff75f2d3e
Update to lamdas
...
PiperOrigin-RevId: 252846439
2019-06-18 13:21:02 -04:00
cketcham
1aa7125398
Update BottomAppBar to respect bottom system insets
...
PiperOrigin-RevId: 252394398
2019-06-18 11:49:00 -04:00
cketcham
cb71e2d582
Update BottomAppBar hideOnScroll offset to account for the shadow drawn at the top of the view.
...
PiperOrigin-RevId: 250562675
2019-05-30 13:59:24 -07:00
cketcham
a9f95ecbc7
Update BottomAppBar to react to layout changes in FAB
...
PiperOrigin-RevId: 250527847
2019-05-29 17:01:32 -04:00
Material Design Team
3c5f9f6cb0
Migrate CoordinatorLayout android support libraries to androidx
...
PiperOrigin-RevId: 248819271
2019-05-21 12:03:28 -04:00
dniz
8f622283d1
Remove CSL theme attribute workarounds
...
Also update androidx dependencies to get latest fixes: appcompat to 1.1.0-alpha04 and core to 1.1.0-alpha05
PiperOrigin-RevId: 246804285
2019-05-06 10:34:04 -04:00
cketcham
1df3a6a44d
Update BottomAppBar to reposition the FAB when the vertical offset is changed
...
PiperOrigin-RevId: 245446154
2019-04-29 15:55:06 -07:00
cketcham
d1b56c3d1e
Update BottomAppBar to use elevation overlay for dark theme
...
PiperOrigin-RevId: 238534227
2019-03-22 16:10:30 -04:00
marianomartin
01874ad4e9
Change setElevation in MSD to use default offset
...
PiperOrigin-RevId: 236858323
2019-03-08 09:58:58 -05:00
cketcham
1f6314cc2f
Fix menu position bug in BottomAppBar
...
Fixes bug where the MenuView would not be positioned correctly if the first call to replaceMenu() happened after the view was laid out.
PiperOrigin-RevId: 235046970
2019-02-24 14:33:02 -05:00
cketcham
7c72808f96
Fix FAB vertical offset bug when BAB is hidden
...
Because the FAB is anchored to the top of the BAB, the animation which hides the BAB also moves down the FAB. This removes the extra animation for the FAB. Because the two animations were running at the same time, the distance between the FAB and the BAB was being calculated incorrectly. This was causing the BAB to think the FAB was higher than it was which resulted in the cutout being drawn too high.
PiperOrigin-RevId: 233844627
2019-02-24 14:13:07 -05:00
cketcham
9678f62c28
Update BottomAppBar to have basic support for use with ExtendedFloatingActionButton
...
PiperOrigin-RevId: 232301919
2019-02-11 11:11:27 -08:00
dniz
a4964594a1
Add MaterialShapeDrawable setElevation(float) and deprecate setShadowElevation(int)
...
PiperOrigin-RevId: 228572421
2019-01-10 17:16:43 -05:00
cketcham
dc72aaeed4
Migrate Gradle build and sources to androidx
...
PiperOrigin-RevId: 225551505
2018-12-21 11:07:45 -05:00
marianomartin
d75fb6513c
Fix constant state in MSD
...
PiperOrigin-RevId: 223802087
2018-12-06 11:46:29 -05:00
Material Design Team
f152b75e1a
Automated g4 rollback of changelist 223558824
...
PiperOrigin-RevId: 223564801
2018-12-06 11:43:02 -05:00
marianomartin
c75482b473
Fix constant state in MSD
...
PiperOrigin-RevId: 223558824
2018-12-06 11:42:42 -05:00
Material Design Team
191bf6c971
Export getActionMenuViewTranslationX() to make subclass be available to customize position of menu view.
...
PiperOrigin-RevId: 223468200
2018-12-06 11:40:11 -05:00
cketcham
ddda11bd2d
Fix slide animation for BottomAppBar
...
PiperOrigin-RevId: 222437688
2018-12-06 11:19:28 -05:00
marianomartin
415e6ea003
Add a cut corners top edge treatment in the BAB demo
...
PiperOrigin-RevId: 222071849
2018-11-26 07:55:59 -05:00
cketcham
88c804ea91
Fix shadow for BottomAppBar so it looks more natural
...
PiperOrigin-RevId: 221534701
2018-11-16 11:58:31 -05:00
cketcham
3d8e2b408c
Stop expanding the clip rect on versions of android that have native shadow support
...
PiperOrigin-RevId: 219478262
2018-11-01 16:17:19 -07:00
cketcham
560c982284
Enable shadows for BottomAppBar
...
PiperOrigin-RevId: 218868156
2018-10-28 21:44:27 -04:00
cketcham
2edfef1a6c
Draw compatibility shadows if the shape is concave or native shadows aren't supported.
...
PiperOrigin-RevId: 217689320
2018-10-28 18:28:35 -04:00