6 Commits

Author SHA1 Message Date
conradchen
fd40fea461 [Switch] Override switch width set by AppCompat to respect the drawable width
PiperOrigin-RevId: 449238028
2022-05-17 14:55:17 -04:00
conradchen
413a047957 [ChipGroup] Fix ChipGroup.getCheckedChipIds() returns wrong state
In the Chip implementation, onCheckedChangeListener was called before onCheckedChangeListenerInternal. This causes an issue that in onCheckedChangeListener's callback, the checkable group's checked state is not updated yet, therefore ChipGroup.getCheckedChipIds() will return the outdated checked state.

Fixes this by overriding Chip.setOnCheckedChangeListener to get full control of the execution order between onCheckedChangeListener and onCheckedChangeListenerInternal.

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

PiperOrigin-RevId: 449100861
2022-05-17 11:04:03 -04:00
dsn5ft
9cd794c72f [Gradle] Remove unit test resources from main library source set and refactor the way test resources are configured/accessed
Resolves https://github.com/material-components/material-components-android/issues/1709

PiperOrigin-RevId: 449026115
2022-05-16 16:08:05 -04:00
marianomartin
238c15759f Migrating to roboelectric 4.1
We were in 3.3.2 so doing a few changes from:
http://robolectric.org/migrating/

- Replaced RuntimeEnvironment.application with ApplicationProvider#getApplicationContext()
- Added android.enableUnitTestBinaryResources=true
   This throws a warning but the release notes say that it can be safely ignored and will
   be fixed in Gradle Plugin 3.4
- Removed @Config(manifest=...) from test
- Added dependencies.
- Added tools:overrideLibrary="androidx.test.core" to use a lower sdk

PiperOrigin-RevId: 226190528
2018-12-21 11:26:40 -05:00
cketcham
dc72aaeed4 Migrate Gradle build and sources to androidx
PiperOrigin-RevId: 225551505
2018-12-21 11:07:45 -05:00
cketcham
077fce370c Add support for robolectric tests with resources in gradle
PiperOrigin-RevId: 215221262
2018-10-01 12:28:30 -04:00