110 Commits

Author SHA1 Message Date
marianomartin
e944d1b2a6 [BottomSheet] Fixed issue where peekHeight is more than the height of the contents
PiperOrigin-RevId: 329722448
2020-09-02 13:29:54 -04:00
Material Design Team
d30f4d2d27 [BottomSheet] Changed DialogFragment import to package qualifier in javadoc.
PiperOrigin-RevId: 329011683
2020-08-28 18:09:02 -04:00
connieshi
db4275fbd3 [a11y][Bottomsheet] Add custom action to drag bottomsheet half expanded.
PiperOrigin-RevId: 326237250
2020-08-12 14:17:36 -04:00
dniz
0df77248d5 [BottomSheet] Changed bottom gesture inset handling to ensure a minimum peek height with a buffer built in, instead of always adding the inset to the peek height (when gesture nav is enabled)
PiperOrigin-RevId: 325866040
2020-08-11 14:41:15 -04:00
Mattia
38216643d6 [BottomSheet] Added missing defensive checks to viewDragHelper calls
Resolves https://github.com/material-components/material-components-android/issues/1295
Resolves https://github.com/material-components/material-components-android/pull/1392

GIT_ORIGIN_REV_ID=cadca3f7e20c387562ab8088227f62f4cd6a40de
PiperOrigin-RevId: 323870916
2020-07-30 00:19:39 -04:00
dniz
96674d59ab [BottomSheet] Fixed NullPointerException when calling updatePeekHeight with null viewRef
PiperOrigin-RevId: 323107185
2020-07-27 13:21:54 -04:00
dniz
9fa9f1e8ea [BottomSheet] Updated gesture inset bottom to be saved in separate field to fix compounding peek height issue
Follow up for https://github.com/material-components/material-components-android/issues/1472

PiperOrigin-RevId: 323079427
2020-07-27 13:21:20 -04:00
marianomartin
049ad022a6 Delete components build.gradle files
PiperOrigin-RevId: 320944144
2020-07-15 09:38:31 -07:00
hunterstich
b93042df2c [BottomSheet] Updated a11y focus to move to bottom sheet when expanded and siblings are hidden from a11y services.
PiperOrigin-RevId: 320631879
2020-07-10 11:53:10 -07:00
dniz
7b620035a7 [Bottom Sheet] Updated peek height gesture inset behavior to only add extra inset if necessary
Previously on Q the peek height would have the bottom gesture inset size added to it regardless of whether edge to edge mode or gesture navigation were enabled. Now the extra inset will only be added if it is needed due to a system gesture conflict, in order to give the user some space to drag the sheet.

Resolves https://github.com/material-components/material-components-android/issues/1472

PiperOrigin-RevId: 320606747
2020-07-10 11:47:27 -07:00
marianomartin
555356b03f Internal cleanup
PiperOrigin-RevId: 318134343
2020-06-26 14:06:52 -04:00
Material Design Team
342ea9ad25 Internal cleanup
PiperOrigin-RevId: 317147378
2020-06-19 13:42:35 -04:00
Material Design Team
76ffe35fef Cleanup
PiperOrigin-RevId: 313865830
2020-06-01 16:52:06 -04:00
Mygod
aa8042f498 [BottomSheet] Make touch_outside unfocusable
Resolves https://github.com/material-components/material-components-android/pull/974

GIT_ORIGIN_REV_ID=682a8b7ac7eb4bcdc238e04c14349b7beb4a8185
PiperOrigin-RevId: 304632071
2020-04-06 12:31:53 -07:00
melaniegoetz
4e28d9c916 Adjust BottomSheet peek height based on insets
PiperOrigin-RevId: 303819564
2020-04-03 08:44:46 -07:00
hunterstich
dce680b91a Fix BottomSheet java doc lint errors
PiperOrigin-RevId: 300605854
2020-03-13 11:13:06 -04:00
melaniegoetz
2a188e507a Change Theme.MaterialComponents.BottomSheetDialog to use new bottomSheet style
Fixes: https://github.com/material-components/material-components-android/issues/1086
PiperOrigin-RevId: 299402955
2020-03-09 09:25:30 -07:00
melaniegoetz
d0f13768b5 Make @style/Widget.MaterialComponents.BottomSheet public
PiperOrigin-RevId: 299139774
2020-03-05 13:11:40 -08:00
cketcham
2cb8909027 Add attributes from BottomSheetBehavior to public.xml
PiperOrigin-RevId: 293841078
2020-02-10 09:56:42 -05:00
Guillermo Mazzola
7ef37a05dd [BottomSheetBehavior] Resolving behavior_expandedOffset as a dimen
Using an integer will remain allowed, however using a dimen will be preferred.

Resolves https://github.com/material-components/material-components-android/pull/836

GIT_ORIGIN_REV_ID=4a02d95855569a076e5ee7a682ea5e8c9988eab9
PiperOrigin-RevId: 293623878
2020-02-06 17:25:57 -05:00
Material Design Team
dc4efe78d9 Make draggable true by default - so it will be true when using Empty Constructor as well
PiperOrigin-RevId: 290121017
2020-01-17 13:02:36 -05:00
ethanhsuhsu
6c1b620565 [BottomSheetDialog] Removed existing content during each setContentView
Resolves https://github.com/material-components/material-components-android/pull/873
Resolves https://github.com/material-components/material-components-android/issues/869

GIT_ORIGIN_REV_ID=7528e645a033c00dee0eac03237eb6d87aa9d002
PiperOrigin-RevId: 288762766
2020-01-08 14:10:39 -08:00
Material Design Team
5b4ea9c966 [BottomSheetBehavior] Add an ability to prevent dragging to expand/collapse the BottomSheet
PiperOrigin-RevId: 288710272
2020-01-08 12:10:25 -08:00
Material Design Team
67fc0c9ff8 Allow collapsed bottom sheet to settle to half expanded state on dragging up.
PiperOrigin-RevId: 286554369
2019-12-21 08:48:14 -05:00
melaniegoetz
e0578295e1 Update BottomSheet to have a singular SettleRunnable
Resolves https://github.com/material-components/material-components-android/issues/516

PiperOrigin-RevId: 283802793
2019-12-05 14:50:09 -05:00
Material Design Team
c47e6a4e3f Set threshold for hiding the bottom sheet so that dragging it down doesn't accidently dismiss it.
PiperOrigin-RevId: 274646607
2019-10-21 10:22:32 -04:00
ldjesper
60da1489fd Provide users with more control over a11y handling with BottomSheet
Resolves https://github.com/material-components/material-components-android/issues/519

Update the catalog to demonstrate usage

PiperOrigin-RevId: 273757779
2019-10-10 15:51:39 -04:00
ldjesper
8b90f02f2b Remove unreleased deprecated method BottomSheetBehavior.getBottomSheetCallback before release
PiperOrigin-RevId: 272934464
2019-10-04 15:32:08 -04:00
ldjesper
747ad12725 Maintain API backwards compatability for BottomSheetBehavior from 1.0.0 by adding a Deprecated constructor.
PiperOrigin-RevId: 272683597
2019-10-03 15:42:38 -04:00
ldjesper
ee37298482 Update BottomSheetDialog to have consistent create and get signatures
This prevents extensions from causing a ClassCastException on calls to getDialog

Resolve https://github.com/material-components/material-components-android/issues/632

PiperOrigin-RevId: 272594580
2019-10-03 11:44:30 -04:00
Material Design Team
2bbb47d48f Recalculate bottom sheet half expanded offset when setHalfExpandedRatio() is called after
the bottom sheet is laid out.

PiperOrigin-RevId: 271985444
2019-10-01 04:05:57 -04:00
Material Design Team
fd13d16292 Support registering multiple BottomSheetCallbacks
PiperOrigin-RevId: 271650665
2019-10-01 03:59:15 -04:00
Material Design Team
08770723e2 Update BottomSheetBehavior documentation for accessibility.
PiperOrigin-RevId: 271443929
2019-09-27 14:04:58 -04:00
Material Design Team
46366ad435 Automated g4 rollback of changelist 270969395
PiperOrigin-RevId: 271016488
2019-09-26 17:54:00 -04:00
Material Design Team
81c967c6a1 Fix broken scrolling when content in the bottom sheet uses nestedScrollingEnabled="false"
PiperOrigin-RevId: 270969395
2019-09-26 17:53:08 -04:00
melaniegoetz
17e3e18edb Automated g4 rollback of changelist 270730347
PiperOrigin-RevId: 270959699
2019-09-26 17:52:44 -04:00
melaniegoetz
fd56af53c7 Adjust BottomSheet peek height based on insets
PiperOrigin-RevId: 270730347
2019-09-24 12:22:28 -04:00
cketcham
cbfc677db4 Add nullability annotation to BottomSheetDialogFragment
This matches the method from AppCompatDialogFragment

PiperOrigin-RevId: 270345625
2019-09-24 12:22:10 -04:00
cketcham
b3aec13c32 Fix nullable annotation for BottomSheetDialogFragment#getDialog()
PiperOrigin-RevId: 270061278
2019-09-20 10:59:01 -04:00
marianomartin
215a839598 Internal cleanup
PiperOrigin-RevId: 267504117
2019-09-12 13:48:16 -04:00
Material Design Team
a41d340b0d Add more a11y support to BottomSheetBehavior.
PiperOrigin-RevId: 266403799
2019-09-04 17:56:27 -04:00
cketcham
7bb525ff59 Update usages of ShapeAppearanceModel to use Builder pattern
PiperOrigin-RevId: 266144471
2019-08-29 15:39:51 -04:00
marianomartin
0d4515cb46 Internal cleanup
PiperOrigin-RevId: 265971745
2019-08-29 14:59:20 -04:00
marianomartin
c99f9522c7 Update peekHeight's getter and setter to be not final.
PiperOrigin-RevId: 265891346
2019-08-29 14:51:33 -04:00
marianomartin
71f65908fa Remove final from BottomSheetBehavior (set/get)State
PiperOrigin-RevId: 265685873
2019-08-29 12:09:31 -04:00
cketcham
2e0fd6d8af Add @NonNull and @Nullable annotations
PiperOrigin-RevId: 264850918
2019-08-26 11:38:56 -04:00
Material Design Team
ac9ca51be2 Fix inconsistent material shape animations in bottom sheet
PiperOrigin-RevId: 264410715
2019-08-26 10:44:33 -04:00
cketcham
edbc7a58d2 Fix nullability of getBehavior() method
The behavior isn't available until the view has been inflated. This inflates the view if the behavior is requested before that happens.

PiperOrigin-RevId: 262551174
2019-08-16 15:38:40 -04:00
cketcham
14b7ba53c2 Fix potential IllegalStateException for BottomSheetDialogFragment#dismiss()
PiperOrigin-RevId: 262549163
2019-08-16 15:37:38 -04:00
Felipe Roriz
37bb299f6e Automated g4 rollback of changelist 261796473
PiperOrigin-RevId: 261908197
2019-08-06 15:28:37 -04:00