50 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
marianomartin
4e62f960ec [TabLayout] Add a setId method that can be used for espresso
PiperOrigin-RevId: 323570079
2020-07-29 09:14:46 -04:00
connieshi
44ff45c57c Update target sdk from 28 to 29 for Material.
PiperOrigin-RevId: 320426815
2020-07-10 11:37:38 -07:00
marianomartin
cb4c1edb21 Update gradle version
PiperOrigin-RevId: 320229763
2020-07-08 15:02:06 -04:00
marianomartin
555356b03f Internal cleanup
PiperOrigin-RevId: 318134343
2020-06-26 14:06:52 -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
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
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
isabellekim
444a16bf2e Update target sdk from 27 to 28 for Material.
PiperOrigin-RevId: 275522338
2019-10-21 10:25:06 -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
e0a5e3ec93 Migrate away from deprecated behavior annotation
PiperOrigin-RevId: 271439031
2019-09-26 18:00:53 -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
leticiars
6f35a22359 Automated g4 rollback of changelist 268680301
PiperOrigin-RevId: 268740076
2019-09-18 13:53:59 -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
cketcham
e448ca24e0 Update gradle lint baseline files
PiperOrigin-RevId: 268513443
2019-09-12 14:16:15 -04:00
marianomartin
a4138293df Internal cleanup
PiperOrigin-RevId: 268507643
2019-09-12 14:12:53 -04:00
marianomartin
ac904ac1c9 Internal cleanup
PiperOrigin-RevId: 265728855
2019-08-29 12:11:15 -04:00
marianomartin
a5a300e171 Internal cleanup
PiperOrigin-RevId: 265503887
2019-08-29 11:26:23 -04:00
Material Design Team
322cbaae8a Automated g4 rollback of changelist 264230778
PiperOrigin-RevId: 264382083
2019-08-20 11:22:09 -04:00
afohrman
04955f6421 Add placeholder text functionality to 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: 264230778
2019-08-20 11:19:02 -04:00
leticiars
80b065cd65 Updating Gradle file.
Disabling VectorRaster check.

PiperOrigin-RevId: 260149366
2019-07-29 16:40:06 -04:00
dniz
5f1be60471 Remove unused include_nestedscrollview.xml test layout file and lint warning
PiperOrigin-RevId: 258389227
2019-07-16 13:09:20 -04:00
dniz
68ddfee0ed Remove Material's legacy androidx core_ui and core_utils dependencies in favor of more granular dependencies (coordinatorlayout, graphics, interpolator, customview)
PiperOrigin-RevId: 257452569
2019-07-10 15:17:12 -04:00
raajkumars
d7a92485f8 Added support to automatically inflate MaterialTextView component into TextView.
Added support to prevent applying line heights from text appearance styles if the current theme sets the flag 'textAppearanceLineHeightEnabled' to false.

PiperOrigin-RevId: 256216184
2019-07-03 14:12:29 -04:00
marianomartin
ad8003d8e9 Internal cleanup
PiperOrigin-RevId: 255441067
2019-07-03 13:56:54 -04:00
raajkumars
bba2866864 * Updated Material components view inflater test to use AndroidX Junit4.
* Refactored basic test into targeted tests for each component.

PiperOrigin-RevId: 254462871
2019-06-24 17:23:42 -04:00
marianomartin
c946144645 Internal cleanup
PiperOrigin-RevId: 254305776
2019-06-24 17:06:45 -04:00
marianomartin
5a5d311a36 Check more lint warnings, show warnings as errors.
PiperOrigin-RevId: 252822573
2019-06-18 13:20:15 -04:00
Material Design Team
3c5f9f6cb0 Migrate CoordinatorLayout android support libraries to androidx
PiperOrigin-RevId: 248819271
2019-05-21 12:03:28 -04:00
leticiars
8ba4383e2c Adding tests for the Exposed Dropdown Menu.
PiperOrigin-RevId: 246509842
2019-05-03 11:07:49 -04:00
ldjesper
8349219be3 Allow limiting of MaterialCalendar to a start and end month. Allow setting of an opening month.
PiperOrigin-RevId: 245269687
2019-04-29 15:41:49 -07:00
connieshi
7d8b2117a0 Automated g4 rollback of changelist 242675939
PiperOrigin-RevId: 242751222
2019-04-19 13:26:30 -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
gauthams
b3793edd2c Add initial support for reading values in MotionSpec
PiperOrigin-RevId: 239298785
2019-03-22 17:00:03 -04:00
leticiars
2642ff2697 Adding support for TextInputLayout start icon. It can be set to be just a drawable or, if a OnClickListener is set to it, a button.
For that reason, users should opt to use the start icon API instead of setting a start/left compound drawable on the text field's edit text.

PiperOrigin-RevId: 238984066
2019-03-22 16:19:36 -04:00
Chris Banes
78054fe4ea AppBarLayout + WindowInset handling fixes
When AppBarLayout is used with a CollapsingToolbarLayout
child, it currently does not handle WindowInsets
very well. This commit fixes that by properly handling
insets.

The primary issue is when an AppBarLayout is used
with a single Toolbar (very common use case), where
the Toolbar will currently be displayed behind the status bar.

Another issue is with HeaderScrollingViewBehavior.
To workaround CoordinatorLayout using its 'compatible measuring'
for insets, the behavior manually sets the scrolling view to fit
system windows. This has other issues though because
that view will get padded in. Fixed by manually adding the insets
back into the measured dimensions.

Also updated the catalog layouts to make use of
android:fitsSystemWindows=true

Resolves https://github.com/material-components/material-components-android/pull/299

PiperOrigin-RevId: 238396626
2019-03-22 16:08:28 -04:00
leticiars
5236a03fc4 Refactoring text field unit tests to test icons separately. Also adding tests for the custom end icon.
PiperOrigin-RevId: 235002414
2019-02-24 14:28:36 -05:00
leticiars
4882a4f131 Adding clear text button end icon to TextInputLayout.
PiperOrigin-RevId: 234141273
2019-02-24 14:15:28 -05:00
leticiars
4c2e9c4004 Changing the TextInputLayout's password toggle implementation into a generic API implementation, which will allow for easier support of future end icons. Also deprecating current password toggle end icon methods and attributes.
This change doesn't include support of a custom end icon yet.

PiperOrigin-RevId: 233645798
2019-02-24 14:07:11 -05:00
dniz
11df79f95c Clean up Gradle build shorthands for appcompat/androidx libraries
PiperOrigin-RevId: 229369959
2019-01-18 14:13:26 -05:00
cketcham
dc72aaeed4 Migrate Gradle build and sources to androidx
PiperOrigin-RevId: 225551505
2018-12-21 11:07:45 -05:00
leticiars
7169461605 Initial support for color subsystem in MDC text fields.
PiperOrigin-RevId: 218608066
2018-10-28 19:14:20 -04:00
connieshi
3c712cbe37 Add build target for MaterialComponentsViewInflater without depending on unused MDC components.
PiperOrigin-RevId: 216542656
2018-10-11 18:20:07 -04:00
ldjesper
8a3856922f Style Material RadioButton
PiperOrigin-RevId: 211998722
2018-09-14 10:50:38 -04:00
dniz
7cd55d872b Add Toolbar styles that use themed text appearances based on type scale
PiperOrigin-RevId: 202636817
2018-07-02 09:50:23 -04:00
afohrman
f2ebf56e21 Rename text field outlined style from "Outline" to "Outlined".
This commit updates the style names for the outlined text field box from "Outline" to "Outlined.

Widget.MaterialComponents.TextInputLayout.OutlineBox -> Widget.MaterialComponents.TextInputLayout.OutlinedBox, and
Widget.MaterialComponents.TextInputEditText.OutlineBox -> Widget.MaterialComponents.TextInputEditText.OutlinedBox.

This name matches spec and is closer to what is used on the other platforms.

PiperOrigin-RevId: 198768731
2018-05-31 16:39:44 -04:00
dniz
e4c8535352 Remove backlayer and materialswitch
PiperOrigin-RevId: 195148145
2018-05-02 17:07:28 -04:00
dniz
9ca33544ac Update package name to com.google.android.material
PiperOrigin-RevId: 193236235
2018-04-30 11:24:23 -04:00