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
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
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
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
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
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
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
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