800 Commits

Author SHA1 Message Date
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
afohrman
4476564820 Vertically center the filled text field's expanded label.
PiperOrigin-RevId: 241791031
2019-04-05 15:46:27 -04:00
afohrman
a17e4373ad Delete unused padding resource from text field's dimens.xml file.
This resource is not in the public.xml file. This means that they are not intended to be shipped as part of our library and are fine to delete.

PiperOrigin-RevId: 241732718
2019-04-05 15:45:31 -04:00
Material Design Team
264e816f56 * Add selected (Active) item default background to NavigationView - introducing seven itemShape* attributes for this purpose
PiperOrigin-RevId: 241720142
2019-04-05 15:43:56 -04:00
marianomartin
e275160a1a Internal change.
PiperOrigin-RevId: 241656157
2019-04-05 15:43:05 -04:00
raajkumars
c3e9cb45a0 Updated extended floating action button to turn off word wrapping only if animating expand/shrink action.
PiperOrigin-RevId: 241594089
2019-04-05 15:30:56 -04:00
ldjesper
63cd0d8428 Change CalendarView to a Fragment as it will contain more fragments
PiperOrigin-RevId: 241414776
2019-04-05 15:29:59 -04:00
ldjesper
12a4f2cff5 Switch from Dialog to DialogFragment for Pickers since future view paging changes will require nested Fragments
PiperOrigin-RevId: 241387847
2019-04-05 15:22:59 -04:00
afohrman
abb21b753f Respect shapeAppearance and shapeAppearanceOverlay attributes in Chip.
Chip was setting chipCornerRadius in the style.

The chipCornerRadius attribute takes precedence over shapeAppearance cornerSize attributes in order to respect values previously set by the user. However, including it in the chip style prevents a cornerSize set in a shapeAppearance or shapeAppearanceOverlay from taking effect. This commit removes chipCornerSize from the chip style to respect cornerSize values.

PiperOrigin-RevId: 241014276
2019-04-05 15:19:48 -04:00
afohrman
2fda77a6ab Remove unnecessary shapeAppearanceOverlay from BottomSheet style.
The shapeAppearanceOverlay attribute was not necessary to achieve the rounded 0 shape appearance for the BottomSheet styles. This commit removes the shapeAppearanceOverlay.

PiperOrigin-RevId: 241006967
2019-04-05 15:18:52 -04:00
connieshi
e6f429fe75 Fix bug that ignored Chip#setEnsureMinTouchTargetAttribute(false) once Chip#setEnsureMinTouchTargetAttribute(true) has been called.
Ensure chip width also meets the min touch target size.

PiperOrigin-RevId: 240679599
2019-04-05 15:17:59 -04:00
afohrman
ad017d9c09 Adjust card widget style.
PiperOrigin-RevId: 240638576
2019-04-05 15:14:55 -04:00
ldjesper
30c15174a1 Add a helper method to resolve min touch target size (defaults 48dp)
PiperOrigin-RevId: 240622378
2019-04-05 15:13:25 -04:00
dniz
760a99f883 Enable Elevation Overlays for Dark Themes and update surface colors to match spec
PiperOrigin-RevId: 240425682
2019-03-26 17:35:50 -04:00
connieshi
37a62a805b s/clearBadgeValue/clearBadgeNumber
PiperOrigin-RevId: 240199703
2019-03-26 17:35:00 -04:00
connieshi
b544530ac0 Update Chip's background / surface color state lists to support state_checked as well.
PiperOrigin-RevId: 240128475
2019-03-26 17:33:09 -04:00
afohrman
17195e41d1 Add documentation to public methods in ShapeAppearanceModel.
Some public methods were missing documentation.

Also remove unnecessary hyphenation from methods that used hyphenation to describe the corner treatment positioning (ex: top-left -> top left).

PiperOrigin-RevId: 239882358
2019-03-26 17:31:59 -04:00
Material Design Team
41274ddb1f Migrate transition android support libraries to androidx.
PiperOrigin-RevId: 239881112
2019-03-26 17:30:06 -04:00
gauthams
3f2d205344 Log a warning rather than an info when setting background on a MaterialButton.
PiperOrigin-RevId: 239880506
2019-03-26 17:29:07 -04:00
melaniegoetz
5aebe1a111 API to set height of a half expanded sheet, in proportion to parent height
PiperOrigin-RevId: 239689682
2019-03-22 17:04:58 -04:00
gauthams
abbec48ce6 Add MotionSpec support to ExtendedFloatingActionButton
PiperOrigin-RevId: 239682035
2019-03-22 17:04:12 -04:00
raajkumars
3f43a2aa3e Updated FloatingActionButton to support dark theme elevation overlays.
PiperOrigin-RevId: 239611087
2019-03-22 17:03:35 -04:00
Chris Banes
0425d3b475 Fix CollapsingToolbarLayout title bounds
Caused by AppBarLayout + WindowInset commit, which breaks some incorrect
assumptions in CTL. Fixed by breaking apart ViewOffsetHelper
so that its tracking of layout coordinates, and applying
offsets, are done at different times.

Also fixed catalog's AppBar sample layouts to set IDs,
enabling state restoration to work.

PiperOrigin-RevId: 239592953
2019-03-22 17:02:58 -04:00
connieshi
e4e6052713 Refactor BadgeDrawable so its center coordinates can be updated.
PiperOrigin-RevId: 239433981
2019-03-22 17:02:02 -04:00
marianomartin
05bc55723a Add a way to disable min touch target size in fab
PiperOrigin-RevId: 239395098
2019-03-22 17:00:43 -04:00
gauthams
b3793edd2c Add initial support for reading values in MotionSpec
PiperOrigin-RevId: 239298785
2019-03-22 17:00:03 -04:00
cketcham
0ce688ddf2 Automated g4 rollback of changelist 239207045
PiperOrigin-RevId: 239229246
2019-03-22 16:55:47 -04:00
leticiars
efc7f37699 Fixing bug of single hex color values set in the XML not being read for icons tint lists.
PiperOrigin-RevId: 239217545
2019-03-22 16:55:11 -04:00
afohrman
36fc2c66c6 Make sure that the ShapeAppearanceModel is always read from the TextInputLayout styles.
The boxCornerRadius attributes were still in the MDC styles, which means that the shapeAppearance and shapeAppearanceOverlay attributes were not respected. This commit removes the boxCornerRadius attributes to ensure that changes to shapeAppearance or shapeAppearanceOverlay are respected where shape theming is enabled.

PiperOrigin-RevId: 239214930
2019-03-22 16:53:04 -04:00