19 Commits

Author SHA1 Message Date
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
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
dniz
72cfef981b Rename prefix mtrl_ to material_ in public resources
PiperOrigin-RevId: 265729121
2019-08-29 12:16:13 -04:00
dniz
37534561f2 Add component styles that swap between primary and surface styles depending on light vs dark theme
Makes it easier for devs to implement: https://material.io/design/color/dark-theme.html#custom-application

PiperOrigin-RevId: 256208965
2019-07-03 14:11:49 -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
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
dniz
3637c23078 Dark theme color palette
PiperOrigin-RevId: 219143246
2018-11-01 16:05:24 -07:00
cketcham
560c982284 Enable shadows for BottomAppBar
PiperOrigin-RevId: 218868156
2018-10-28 21:44:27 -04:00
dniz
ea40a1d406 Update Toolbar to use new color system
PiperOrigin-RevId: 216770087
2018-10-11 18:31:53 -04:00
cketcham
e951ecbd1b Add color system support for BottomAppBar
PiperOrigin-RevId: 215374247
2018-10-02 14:54:08 -04:00
cketcham
f2aba00d8a Set maxButtonHeight for BottomAppBar to avoid alignment issues
PiperOrigin-RevId: 210763592
2018-08-31 11:11:26 -04:00
cketcham
abee218646 Fix height of BottomAppBar in landscape
BottomAppBar was incorrectly using the Toolbar min height which is less tall in landscape. It should always be 56dp.

PiperOrigin-RevId: 210362480
2018-08-28 16:41:25 -04:00
cketcham
71f5ea1415 Add alternate animations for BottomAppBar mode changes
PiperOrigin-RevId: 210096177
2018-08-28 16:40:25 -04:00
cketcham
841ba156fc Automated g4 rollback of changelist 199530791
PiperOrigin-RevId: 201188669
2018-06-20 17:29:57 -04:00
afohrman
b087cbad7a Roll back deletion of FAB attachment functionality.
PiperOrigin-RevId: 199530791
2018-06-20 17:24:55 -04:00
cketcham
cdb99838c6 Don't allow the fab to be detached from the BottomAppBar unless the fab isn't visible, or the BottomAppBar is scrolled off the screen
PiperOrigin-RevId: 199511216
2018-06-20 17:24:01 -04:00
cketcham
c172562488 Update BottomAppBar fab margin to represent the distance between the cutout and the fab rather than twice the distance
PiperOrigin-RevId: 197939692
2018-05-30 17:32:51 -04:00
marianomartin
1e4a3d17fb Dynamically getting size of the fab button. Using that plus a margin defined in style to get the proper size for the cutout
PiperOrigin-RevId: 194232804
2018-04-30 12:01:20 -04:00
dniz
9ca33544ac Update package name to com.google.android.material
PiperOrigin-RevId: 193236235
2018-04-30 11:24:23 -04:00