9 Commits

Author SHA1 Message Date
Material Design Team
6096d60959 Roll Forward of CL 242858439
PiperOrigin-RevId: 243197143
2019-04-19 15:48:51 -04:00
Material Design Team
3666e15298 Automated g4 rollback of changelist 242858439
PiperOrigin-RevId: 242907738
2019-04-19 15:30:07 -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
cketcham
dc72aaeed4 Migrate Gradle build and sources to androidx
PiperOrigin-RevId: 225551505
2018-12-21 11:07:45 -05:00
cketcham
3ad01eceda Ignore empty header and dividers when counting the number of items in NavigationView for accessibility
PiperOrigin-RevId: 223407274
2018-12-06 11:39:08 -05:00
Brian Attwell
483d34a0f4 Don't rebind/relayout/reinflate any views after clicking a menu item
If none of the check state has changed, let's not update the menu. Background for this diff is at #61. While larger improvements may make sense, this diff is designed to mitigate the most serious issue in a way that doesn't create risk.

Test: used these modified classes inside the Android Uber app and ran a profiler. The problematic 50ms delay caused by this bug was fixed. You can see the before/after traces in https://issuetracker.google.com/issues/73723207.

Resolves https://github.com/material-components/material-components-android/issues/61
Resolves https://github.com/material-components/material-components-android/pull/62

GIT_ORIGIN_REV_ID=f8f8488689be67b8974d29e1c623e1dbe18cfdae
PiperOrigin-RevId: 221799350
2018-11-16 12:23:34 -05:00
Material Design Team
18c93ad9ae Allow setting the size for navigation view icons
PiperOrigin-RevId: 208214420
2018-08-17 17:09:59 -04:00
gauthams
ac27064891 Add paired getter and setter for NavigationView setCheckedItem()/getCheckedItem()
PiperOrigin-RevId: 193267214
2018-04-30 11:28:37 -04:00
dniz
9ca33544ac Update package name to com.google.android.material
PiperOrigin-RevId: 193236235
2018-04-30 11:24:23 -04:00