Material Design Team
2f3e1c4cf4
Add new MODE_AUTO setting for TabLayout. MODE_AUTO behaves like MODE_FIXED with GRAVITY_CENTER while the tabs fit in the content view. Once the tabs expand beyond the TabLayout width, the TabLayout behaves as MODE_SCROLLABLE.
...
PiperOrigin-RevId: 243852684
2019-04-19 21:21:27 -04:00
ldjesper
b2aa764e38
Default Dialog windowBackground color to colorSurface for darkmode pickers.
...
PiperOrigin-RevId: 243849451
2019-04-19 21:14:52 -04:00
ldjesper
a94152a475
Change GM Dialog elevation to 6dp (which improves text contrast) and correct theme loading order such that materialAlertDialogTheme correctly overrides attributes in alertDialogTheme.
...
PiperOrigin-RevId: 243708330
2019-04-19 21:09:36 -04:00
gauthams
163c0ed3f5
Update ExtendedFAB to support setting corner radius via shape appearance
...
PiperOrigin-RevId: 243677036
2019-04-19 21:07:37 -04:00
afohrman
ed4260f5fb
Use the framework's setFitsSystemWindows method rather than the deprecated ViewUtils version.
...
PiperOrigin-RevId: 243667717
2019-04-19 21:06:28 -04:00
afohrman
6e98554a8c
Remove unnecessary return tag in NavigationView#getCheckedItem().
...
The @return tag is redundant; return tags are not required in cases where the tag does not add value.
PiperOrigin-RevId: 243663808
2019-04-19 21:05:32 -04:00
cketcham
6b1459d557
Add generic type for FloatingActionButton TransformationListener
...
PiperOrigin-RevId: 243652927
2019-04-19 21:02:55 -04:00
dniz
1f244318d8
Add @hide to all @RestrictTo annotations that are missing it
...
PiperOrigin-RevId: 243646339
2019-04-19 16:29:30 -04:00
connieshi
fd9d884acb
Update BadgeDrawable to have public scope.
...
Update #getNumber to return non-negative integers.
Replace internal references to getNumber() with 'number' field when comparing to ICON_BADGE_NUMBER.
PiperOrigin-RevId: 243633143
2019-04-19 16:28:30 -04:00
connieshi
29f132bcd3
Remove unused methods for getting a badge's default background and text color.
...
PiperOrigin-RevId: 243615474
2019-04-19 16:26:59 -04:00
gauthams
64ad735c12
Add MaterialButtonToggleGroup docs
...
PiperOrigin-RevId: 243345601
2019-04-19 16:22:36 -04:00
connieshi
248e71adb7
Refactor logic to set BadgeDrawable's bounds into its own method.
...
PiperOrigin-RevId: 243326170
2019-04-19 15:59:16 -04:00
connieshi
ac1b2a0a26
Add javadoc for BadgeDrawable.
...
PiperOrigin-RevId: 243312323
2019-04-19 15:58:20 -04:00
Material Design Team
18b8ddaf23
Automated g4 rollback of changelist 243269991
...
PiperOrigin-RevId: 243279282
2019-04-19 15:57:35 -04:00
connieshi
94dbf74f08
Add a convenience method to create an instance of BadgeDrawable with default values.
...
PiperOrigin-RevId: 243272352
2019-04-19 15:56:48 -04:00
marianomartin
100d66cc25
Exclude BottomSheetBehavior from widget package
...
PiperOrigin-RevId: 243269991
2019-04-19 15:55:49 -04:00
dniz
1889b9fed6
Add support for translationZ to MaterialShapeDrawable
...
Useful for animating elevation shadows in Light themes and elevation overlays in Dark Themes
PiperOrigin-RevId: 243260129
2019-04-19 15:54:27 -04:00
connieshi
44f26a8d30
Simplify BadgeDrawable's constructor to not require anchor view or custom parent view.
...
PiperOrigin-RevId: 243259902
2019-04-19 15:50:59 -04:00
Material Design Team
6096d60959
Roll Forward of CL 242858439
...
PiperOrigin-RevId: 243197143
2019-04-19 15:48:51 -04:00
gauthams
c384ec5423
Add elevation overlay support to TabLayout
...
PiperOrigin-RevId: 243131594
2019-04-19 15:48:05 -04:00
connieshi
b7e252cea4
Update javadoc for MaterialColors#layer(CSL, CSL) to warn about states being dropped.
...
PiperOrigin-RevId: 243120366
2019-04-19 15:43:20 -04:00
ldjesper
9809b797bf
Shrink inset margins for landscape mode of dialogs
...
PiperOrigin-RevId: 243103737
2019-04-19 15:42:29 -04:00
dniz
249e6f5281
Implement new MaterialToolbar class that provides support for Dark Theme elevation overlays, if not using AppBarLayout
...
PiperOrigin-RevId: 243054730
2019-04-19 15:37:34 -04:00
connieshi
574157e153
Fix chip background color state bug:
...
PiperOrigin-RevId: 243047644
2019-04-19 15:35:58 -04:00
Material Design Team
5a54a33aca
Add a getter to check isExtended for ExtendedFloatingActionButton.
...
Context: This is useful to test the state of the extended fab post a shrink() or extend() call. Since we can't mock Views in unit tests, we can't verify calls on void methods for views, so this makes it such that we can assert the end state of those calls.
PiperOrigin-RevId: 242997029
2019-04-19 15:34:04 -04:00
Chris Banes
5b94ec83a7
Add statusBarForeground functionality to AppBarLayout
...
Currently AppBarLayout lacks the functionality which
CollapsingToolbarLayout does, to draw a drawable behind
the status bar. This CL adds that functionality.
Also added related functionality to Catalog
PiperOrigin-RevId: 242949840
2019-04-19 15:31:25 -04:00
Material Design Team
3666e15298
Automated g4 rollback of changelist 242858439
...
PiperOrigin-RevId: 242907738
2019-04-19 15:30:07 -04:00
ldjesper
bada4a8d9b
Maintain state on rotation
...
PiperOrigin-RevId: 242883550
2019-04-19 15:25:19 -04:00
afohrman
db408ee4ce
Add clearer documentation that box background colors are only supported for filled text fields.
...
PiperOrigin-RevId: 242870719
2019-04-19 15:24:13 -04:00
Material Design Team
3f12bd50e2
Add a itemMaxLines Attribute to NavigationView
...
Add a itemMaxLines attr to NavigationView and propagate it down to the internal CheckedTextView.
Also, make a slight change to design_navigation_item.xml layout to accommodate multiple lines of text. Without the layout change, the layout_height of the item is set to "?attr/listPreferredItemHeightSmall" so it can't contain an arbitrary number of lines. It can also chop lines in the middle.
To fix this, we change layout_height to "wrap_content" and add a minHeight attribute set to "?attr/listPreferredItemHeightSmall". This results in the same behavior for single line items but expands appropriately to contain items with multiple rows.
PiperOrigin-RevId: 242858439
2019-04-19 15:15:23 -04:00
connieshi
7d8b2117a0
Automated g4 rollback of changelist 242675939
...
PiperOrigin-RevId: 242751222
2019-04-19 13:26:30 -04:00
ricknout
8d639eed39
Fix BottomSheetBehavior halfExpandedOffset calculation
...
GIT_ORIGIN_REV_ID=2dcee04951fe4cd12241d62b819f91cac9da1301
PiperOrigin-RevId: 242699135
2019-04-19 13:22:39 -04:00
connieshi
00ffe5eea8
Begin integrating BadgeDrawable into BottomNavigationView.
...
TODO:
- update javadocs to provide guidance on how to call Badging API.
- Save badge states.
- Support displaying badges when bottom navigation item doesn't show an icon.
PiperOrigin-RevId: 242675939
2019-04-19 13:21:35 -04:00
connieshi
fd2a6f2b6b
Add parcelable versions of SparseIntArray and SparseBooleanArray for internal use.
...
PiperOrigin-RevId: 242675268
2019-04-19 13:18:06 -04:00
gauthams
add453fe8f
Fix link to deprecated API in TabLayout documentation
...
PiperOrigin-RevId: 242672044
2019-04-19 13:16:55 -04:00
leticiars
27eac541b0
Fixing end and start icon ripples appearing behind text input layout.
...
PiperOrigin-RevId: 242660816
2019-04-19 13:09:03 -04:00
gauthams
d5bbc9cf43
Implement Shapeable interface in MaterialButton
...
PiperOrigin-RevId: 242559479
2019-04-19 13:00:59 -04:00
gauthams
64d7de8020
Add checkedId tracking for singleSelection mode of MaterialButtonToggleGroup
...
PiperOrigin-RevId: 242558776
2019-04-19 13:00:04 -04:00
dniz
858dd77976
Update Dark Theme Elevation Overlay equation to add an extra 2% of alpha
...
PiperOrigin-RevId: 242527904
2019-04-19 12:58:46 -04:00
connieshi
44e26156be
Add build.gradle for the badge module.
...
PiperOrigin-RevId: 242516608
2019-04-19 12:57:22 -04:00
dniz
3fd054086c
Add demo for Drag-and-Drop of Material Cards in a List and clear ripple when drag starts
...
PiperOrigin-RevId: 242474750
2019-04-19 12:53:43 -04:00
connieshi
d195fadce0
Fix typo in formatted string that set the first argument as string instead of decimal.
...
Fix lint warnings.
PiperOrigin-RevId: 242114925
2019-04-05 16:04:19 -04:00
connieshi
a2c5d8956d
Add static methods to return BadgeDrawable's default background and text color for the specified context.
...
PiperOrigin-RevId: 242111627
2019-04-05 16:01:05 -04:00
ldjesper
bcc9a83dad
Allow MonthInYearAdapter to draw its child views correctly when created
...
PiperOrigin-RevId: 241958804
2019-04-05 15:59:09 -04:00
Material Design Team
ba7ac68af5
Minor: Replace duplicate "Cancel" string by the one from the framework
...
Removed duplicate mtrl_picker_cancel and reference @android:string/cancel instead.
PiperOrigin-RevId: 241935524
2019-04-05 15:56:45 -04:00
isabellekim
6b9858b4b8
Remove unused theme styleables.
...
PiperOrigin-RevId: 241933487
2019-04-05 15:52:08 -04:00
ldjesper
1e2bde215d
Prevent several calendar views being layed on top of each other on rotation changes
...
PiperOrigin-RevId: 241933297
2019-04-05 15:50:53 -04:00
ldjesper
35a1401a52
Switch from multiple related extends to an interface
...
PiperOrigin-RevId: 241870753
2019-04-05 15:50:05 -04:00
Material Design Team
a13ff980a5
Automated g4 rollback of changelist 241720142
...
PiperOrigin-RevId: 241804673
2019-04-05 15:48:38 -04:00
dniz
6d4ffa29e3
AppBarLayout Dark Theme Elevation Overlays support, including animated overlay for Lift On Scroll
...
PiperOrigin-RevId: 241791205
2019-04-05 15:47:39 -04:00