356 Commits

Author SHA1 Message Date
Material Design Team
fc1208f4a4 [TextInputLayout] Allow hint text set in TextInputLayout to be passed on to the Autofill service
Resolves https://github.com/material-components/material-components-android/issues/1412

PiperOrigin-RevId: 330780010
2020-09-10 11:13:38 -04:00
Gabriele Mariotti
076ff69343 [TextInputLayout] Added hintText, helperText, placeholderText to restoreInstanceState
Resolves https://github.com/material-components/material-components-android/pull/1629
Resolves https://github.com/material-components/material-components-android/issues/1384

GIT_ORIGIN_REV_ID=3c3ac47f054e7c1f8ae7b7459337f094bfdbe56a
PiperOrigin-RevId: 329741165
2020-09-09 11:21:42 -04:00
momt99
ee93fc15c4 [TextInputLayout] Added id for errorIconView
Resolves https://github.com/material-components/material-components-android/pull/1624
Resolves https://github.com/material-components/material-components-android/issues/1623

GIT_ORIGIN_REV_ID=acf854dc995d734383ed25689b8efd7606f75537
PiperOrigin-RevId: 327673226
2020-08-20 16:48:23 -04:00
marianomartin
4e62f960ec [TabLayout] Add a setId method that can be used for espresso
PiperOrigin-RevId: 323570079
2020-07-29 09:14:46 -04:00
hunterstich
d4d9b97518 [DatePicker] Add InstantTaskExecutorRule to tests with lifecycle events
PiperOrigin-RevId: 321365897
2020-07-15 09:53:17 -07:00
connieshi
44ff45c57c Update target sdk from 28 to 29 for Material.
PiperOrigin-RevId: 320426815
2020-07-10 11:37:38 -07:00
marianomartin
555356b03f Internal cleanup
PiperOrigin-RevId: 318134343
2020-06-26 14:06:52 -04:00
Material Design Team
073382034a Migrate android.support.v4.content.ContextCompat to androidx
Android X migration

PiperOrigin-RevId: 315791679
2020-06-11 17:27:51 -07:00
leticiars
167020a596 [TextInputLayout] Adding setters and getters for boxStrokeWidth and boxStrokeWidthFocused attrs.
PiperOrigin-RevId: 308059511
2020-04-23 20:10:31 -04:00
Kirill Olenyov
1b124afa02 [TextInputLayout] Add click listener for error icon
Resolves https://github.com/material-components/material-components-android/pull/1215

GIT_ORIGIN_REV_ID=f2ae41512162b09c4e37fa727b465970eb83f2b1
PiperOrigin-RevId: 307624385
2020-04-22 15:06:21 -04:00
leticiars
d1850a3d78 [ExposedDropdownMenu] Implement workaround to inputType=none not working + move MaterialAutoCompleteTextView to textfield/ directory.
The alternative to android:editable="false" (which is deprecated) is to set inputType="none", however due to a framework bug that has no effect. This change makes it so it works as expected.

PiperOrigin-RevId: 299411110
2020-03-09 09:36:24 -07:00
Material Design Team
542fe64af7 Add @Test annotation to methods which appear to be intended to be JUnit4 test methods.
(This will cause the test to start running. If it failed, I've added @Ignore.)

PiperOrigin-RevId: 295062381
2020-02-14 12:06:00 -05:00
Material Design Team
77ad9c3855 Migrate static imports of org.mockito.Matchers to org.mockito.ArgumentMatchers
The former is deprecated and replaced by the latter in Mockito 2.

PiperOrigin-RevId: 292563187
2020-01-31 13:48:10 -05:00
cketcham
6e340c49d4 Fix BottomAppBarTopEdgeTreatment bug caused by large negative vertical offset
While some small negative values for vertical offset do work, this use case is currently not supported. Most negative values result in the cutout being drawn incorrectly. This also adds a new exception to help clarify the crash in the future.

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

PiperOrigin-RevId: 292148159
2020-01-29 16:15:04 -05:00
Material Design Team
0a03911f89 Add more a11y support to AppBarLayout's BaseBehavior.
PiperOrigin-RevId: 289692654
2020-01-14 15:05:59 -08:00
Material Design Team
5b4ea9c966 [BottomSheetBehavior] Add an ability to prevent dragging to expand/collapse the BottomSheet
PiperOrigin-RevId: 288710272
2020-01-08 12:10:25 -08:00
Material Design Team
5de9f01ade Move a11y delegate code from BottomNavigationView and TabLayout to onInitializeA11yNodeInfo.
PiperOrigin-RevId: 286929652
2019-12-23 15:44:28 -05:00
isabellekim
b8afe2b41f Add types to Matchers to avoid warnings about raw types and unchecked
method invocations.

PiperOrigin-RevId: 286404247
2019-12-19 15:44:51 -05:00
afohrman
201ec6241c Add support for placeholder text in TextInputLayout.
This is the initial implementation of placeholder text; it does not contain motion. At this stage, TextInputLayout sets the placeholder text visibility based on whether or not it should show.

PiperOrigin-RevId: 284808331
2019-12-11 17:06:57 -05:00
Material Design Team
d548948b9c [TabLayout] Re-introducing TabLayout indicator animator fix from cl/283626239
Includes a preemptive fix for b/145715060, which was introduced in the first attempt.

PiperOrigin-RevId: 284229049
2019-12-08 15:21:33 -05:00
Material Design Team
d8c35d7de9 Automated g4 rollback of changelist 283626239
PiperOrigin-RevId: 284045727
2019-12-08 14:43:33 -05:00
melaniegoetz
e0578295e1 Update BottomSheet to have a singular SettleRunnable
Resolves https://github.com/material-components/material-components-android/issues/516

PiperOrigin-RevId: 283802793
2019-12-05 14:50:09 -05:00
Material Design Team
aa3164d43a [Tabs] Remove unnecessary animator cancellation in SlidingTabIndicator's onLayout method.
PiperOrigin-RevId: 283626239
2019-12-05 14:37:00 -05:00
leticiars
aeb9eea9d8 Allow a content description to be set on a text field error view. This is useful for when the error message has special characters that TalkBack cannot read.
PiperOrigin-RevId: 280508115
2019-11-15 15:12:03 -05:00
haodong
ca066838a0 Improve AppBar collapsing tests.
Original test intended to swipe up from the scroll view. However, it actually swipe from the AppBarLayout, since the status bar's height doesn't considered.

New tests swipe up from AppBarLayout and the scroll view respectively.

PiperOrigin-RevId: 279379911
2019-11-11 16:35:56 -05:00
leticiars
816f080be2 Fixing helper text disappearing when setError(null) is called and the error is already null.
Resolves https://github.com/material-components/material-components-android/issues/525
Resolves https://github.com/material-components/material-components-android/pull/737

PiperOrigin-RevId: 279121898
2019-11-07 16:11:49 -05:00
haodong
c1ec5f75f3 Automated g4 rollback of changelist 278988664
PiperOrigin-RevId: 279112871
2019-11-07 16:10:57 -05:00
haodong
91466c6ad8 Fix AppBar collapsing after restore test.
Increased the y coordinate of the start position of the swipe up movement. Status bar's height is considered.

PiperOrigin-RevId: 278988664
2019-11-07 16:08:14 -05:00
connieshi
de005027bc Fix bug in bottom navigation badge state restoration that did not set the badges on the menu item views.
Update catalog demo to save and restore states in the bottom navigation demos.

PiperOrigin-RevId: 278436621
2019-11-06 10:14:43 -05:00
isabellekim
444a16bf2e Update target sdk from 27 to 28 for Material.
PiperOrigin-RevId: 275522338
2019-10-21 10:25:06 -04:00
Material Design Team
c47e6a4e3f Set threshold for hiding the bottom sheet so that dragging it down doesn't accidently dismiss it.
PiperOrigin-RevId: 274646607
2019-10-21 10:22:32 -04:00
ldjesper
ee37298482 Update BottomSheetDialog to have consistent create and get signatures
This prevents extensions from causing a ClassCastException on calls to getDialog

Resolve https://github.com/material-components/material-components-android/issues/632

PiperOrigin-RevId: 272594580
2019-10-03 11:44:30 -04:00
leticiars
c74120d3d7 Automated g4 rollback of changelist 271432476
PiperOrigin-RevId: 272057811
2019-10-01 04:10:55 -04:00
leticiars
1217dcfb55 Making the non editable Exposed Dropdown Menu accessible through TalkBack interaction.
In TalkBack, once the menu is double tapped the focus automatically changes to the first item on the dropdown list, just like how it would with a Spinner.

Clients may keep using the framework's AutoCompleteTextView inside of the TextInputLayout as before.

PiperOrigin-RevId: 272026973
2019-10-01 04:08:33 -04:00
Material Design Team
fd13d16292 Support registering multiple BottomSheetCallbacks
PiperOrigin-RevId: 271650665
2019-10-01 03:59:15 -04:00
hunterstich
4f70ac8955 Update FloatingActionButton to implement the Shapeable interface.
PiperOrigin-RevId: 271566824
2019-09-27 14:06:05 -04:00
leticiars
544c2af103 Adding hintTextErrorColor color attribute to be used for the collapsed hint text color when an error is being displayed.
PiperOrigin-RevId: 271432476
2019-09-26 17:58:11 -04:00
connieshi
230ed9263f Add null checks to avoid NPE when tabs that have badges are reset .
Resolves https://github.com/material-components/material-components-android/issues/620

PiperOrigin-RevId: 271126107
2019-09-26 17:54:25 -04:00
leticiars
88d316e0f4 Adding boxStrokeErrorColor color attribute to be used for the outlined text field stroke color when an error is being displayed.
PiperOrigin-RevId: 270088868
2019-09-20 11:00:03 -04:00
ldjesper
ee891219d5 Change text scaling and landscape width for small screens.
PiperOrigin-RevId: 269862267
2019-09-20 10:45:32 -04:00
leticiars
6e5ddcfb0e Adding support for prefix and suffix in text fields.
Prefix text can be set via the prefixText attribute or via the setPrefixText(CharSequence) method.
Similarly, suffix text can be set via the suffixText attribute or via setSuffixText(CharSequence)

PiperOrigin-RevId: 269799139
2019-09-18 14:21:37 -04:00
cketcham
c708ee7827 Fix test failure for FAB instrumentation tests from timeouts while waiting for rotation
PiperOrigin-RevId: 269576461
2019-09-18 14:18:59 -04:00
leticiars
6f35a22359 Automated g4 rollback of changelist 268680301
PiperOrigin-RevId: 268740076
2019-09-18 13:53:59 -04:00
marianomartin
167663ae45 Internal cleanup
PiperOrigin-RevId: 268698913
2019-09-12 14:29:01 -04:00
leticiars
55f85bcc6e Adding support for prefix and suffix in text fields.
Prefix text can be set via the prefixText attribute or via the setPrefixText(CharSequence) method.
Similarly, suffix text can be set via the suffixText attribute or via setSuffixText(CharSequence)

PiperOrigin-RevId: 268680301
2019-09-12 14:26:15 -04:00
Material Design Team
76ef7cedc1 Internal update
PiperOrigin-RevId: 268560752
2019-09-12 14:24:41 -04:00
ldjesper
d78d93577f Remove Month from the public API
PiperOrigin-RevId: 268242042
2019-09-12 13:57:19 -04:00
marianomartin
c178633441 Internal cleanup
PiperOrigin-RevId: 268017966
2019-09-12 13:55:18 -04:00
marianomartin
215a839598 Internal cleanup
PiperOrigin-RevId: 267504117
2019-09-12 13:48:16 -04:00
ldjesper
72d54c653c Change picker package to com.google.android.material.datepicker
PiperOrigin-RevId: 267004501
2019-09-04 18:07:59 -04:00