17 Commits

Author SHA1 Message Date
dniz
89a1bf883f [Snackbar] Added ability to have Snackbar position respond to anchor view layout changes
Disabled by default to avoid changes in behavior and breakages in tests

PiperOrigin-RevId: 333299318
2020-09-23 12:10:02 -07:00
marianomartin
555356b03f Internal cleanup
PiperOrigin-RevId: 318134343
2020-06-26 14:06:52 -04:00
hunterstich
b631ef6979 [Slider] Fix slider tooltip in popupwindows
Slider needs to find an ancestor in which it can add its tooltip overlay. When added in a PopupWindow, its possible to search up the view hierarchy and find a parent which is neither a View nor a ViewGroup. This change adds a check for this case

A note is that this change updates edge cases to return the current parent if it is any valid ancestor instead of just returning null. This allows Slider's tooltip to be added to Popup windows, but doesn't guarantee that the tooltip will be fully visible since a PopupWindow's height might be smaller than the slider + tooltip. If adding a Slider to a PopupWindow, you might need to manually add height to your popup's content view to account for the tooltip or turn of the slider's label.

PiperOrigin-RevId: 310913776
2020-05-11 16:04:03 -04:00
hunterstich
d6501c97bc [Slider] Fix attach/detach behavior when Slider is added in an overlay as part of a Transition.
Resolves https://github.com/material-components/material-components-android/issues/1195

A Visibility transition will add Slider to an overlay and then call onAttachToWindow/onDetachFromWindow which looks for an android.R.id.content view, which doen't exist, getting stuck in a loop. This adds an exit strategy for android.R.id.content not being found and fixes Slider in Visibility transitions.

PiperOrigin-RevId: 305886706
2020-04-13 10:21:36 -07: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
7d4b472262 Add copy of ViewOverlay compatibility until it is included in androidx
PiperOrigin-RevId: 283403884
2019-12-03 17:16:13 -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
cketcham
81e708e1bb Add @NonNull and @Nullable annotations
PiperOrigin-RevId: 264745164
2019-08-26 11:19:28 -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
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
cketcham
8a2e358f1f Fix issue with insets being overwritten by providing a copy
PiperOrigin-RevId: 253785920
2019-06-18 13:53:14 -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
dniz
2ab5bdbf29 Date Picker text field toggle
PiperOrigin-RevId: 251443135
2019-06-10 08:45:32 -07:00
gauthams
1db449c897 Refactor dpToPx method into ViewUtils
PiperOrigin-RevId: 235243747
2019-02-24 14:38:37 -05:00
cketcham
dc72aaeed4 Migrate Gradle build and sources to androidx
PiperOrigin-RevId: 225551505
2018-12-21 11:07:45 -05:00
dniz
9ca33544ac Update package name to com.google.android.material
PiperOrigin-RevId: 193236235
2018-04-30 11:24:23 -04:00