22 Commits

Author SHA1 Message Date
afohrman
6d28b64043 Update documentation to discourage setting the hint on TextInputEditText.
Remove ambiguity about where to set the hint by strongly recommending that it be set on the TextInputLayout.

This commit also updates the documentation to more strongly encourage the use of TextInputEditText over an EditText.

PiperOrigin-RevId: 201037651
2018-06-20 17:28:41 -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
afohrman
bdb25ff7e3 Use android:padding attributes instead of boxPadding attributes for text field dimensions.
Move to use native android:padding attrs instead of custom boxPadding attributes for text fields. This is accomplished by creating box styles for TextInputEditText, and setting android:padding attributes in those.

The TextInputLayout box styles set the appropriate TextInputEditText style on its child by wrapping the TextInputEditText style in theme overlays. This is kind of neat, since it allows for the user not to have to set a style on both the TextInputLayout and TextInputEditText - the user does not even have to know about the TextInputEditText styles with this pattern. It should also help clear up some confusion over where to set the hint and other areas of haziness between TextInputLayout and TextInputEditText.

The default editTextStyle is set to the filled box style, to match the default TextInputLayout style.

This change removes the box padding attributes, and it also removes the dimension resources in favor of setting them in the style to improve readability.

This commit also changes TextInputEditText constructors to both use a theme attribute in the 3-arg constructor and call through to the TextInputEditText overloaded constructors rather than call the super's constructor from each. This allows the theme attribute set in the theme overlays to take effect.

PiperOrigin-RevId: 198051251
2018-05-30 17:35:13 -04:00
afohrman
6709e6af1e Remove escape characters from links in TextInputLayout documentation.
PiperOrigin-RevId: 196504132
2018-05-16 11:43:25 -04:00
afohrman
4d4923e00a Fix formatting for text field attribute table.
GitHub was failing to render the table with multi-line rows.

PiperOrigin-RevId: 196501962
2018-05-16 11:43:00 -04:00
cketcham
73d1c6f148 Update links in material component docs
PiperOrigin-RevId: 195898245
2018-05-08 20:10:49 -04:00
Material Design Team
87b5e046c4 Replace links to Material design guidance with short links as appropriate.
PiperOrigin-RevId: 194927609
2018-05-01 17:10:56 -04:00
dniz
375eb8220b Update docs to point to new widget class locations
PiperOrigin-RevId: 193539651
2018-04-30 11:34:37 -04:00
dniz
9ca33544ac Update package name to com.google.android.material
PiperOrigin-RevId: 193236235
2018-04-30 11:24:23 -04:00
markwei
19c081b025 Use common style header for TextInputLayout
PiperOrigin-RevId: 183316060
2018-02-27 13:21:50 -05:00
markwei
1bc7c013d1 Add updated Material theme guidance on top of component documentation.
The goal is that this snippet can be copied and pasted across all of our component documentation.

PiperOrigin-RevId: 183315682
2018-02-27 13:05:53 -05:00
travisc
ab2fec6da4 Move lib/src/ to lib/java/, and lib/jvmtests/javatests/ to lib/javatests/.
Bazel is happier if Java/Java test roots are named 'java' and 'javatests', and
this will mean that once we create a BUILD file for
android/support/design/{widget,internal}/ we'll no longer need a custom package
specified in our build (which tends to cause build problems that manifest quite
weirdly). This commit doesn't attempt to refactor the build at all yet, and is
just a pure move.

PiperOrigin-RevId: 178060739
2018-01-11 10:50:18 -05:00
dniz
4538e1ec69 Update text field documentaion for new functionality
PiperOrigin-RevId: 175669674
2017-11-14 15:07:16 -05:00
dniz
56f5cca116 Update TextInputLayout documentation to have notes about setting hint programmatically.
PiperOrigin-RevId: 173691474
2017-11-14 14:11:07 -05:00
dcarlsson
c6fdfe669e Update headers for Android Material Components documentation to clarify page titles in relation to table of contents/index listings.
- Update page title for each piece of documentation to use the vernacular concept rather
than the class name for the component.
- Treat all instances of class names as proper nouns and mark them as code names.

PiperOrigin-RevId: 155705022
2017-05-11 12:57:38 -07:00
afohrman
0a157b9975 Fix semi-broken link in TextInputLayout documentation.
The link to a method on Android's doc site had slashes in it, so it linked to the right documentation page, but not the specific method.

PiperOrigin-RevId: 155658544
2017-05-10 12:05:58 -07:00
Material Design Team
17ded0f2e1 Update one-line component descriptions for consistency across the three MDC sites.
PiperOrigin-RevId: 155531666
2017-05-09 13:00:58 -07:00
shyndman
50cc15caa4 Adds screenshot mocks to the documentation of several components.
PiperOrigin-RevId: 155454192
2017-05-08 18:04:09 -07:00
shyndman
a14fe167cf Documentation cleanup.
I'm updating this CL as I go to fix all the issue we can find.

* Icon lists items now use correct icons, and are rearranged to be consistent.
* Removed HTML comments that were interfering with the Liquid templates.
* Added the benefits list to the docsite-index.
* Capitalized "Design" in Material Design.
* Spec links in icon list now use consistent labels.
* URLs, headings and page titles are now internally consistent within the platform.

PiperOrigin-RevId: 155445665
2017-05-08 16:48:53 -07:00
afohrman
246d51ca6f Change formatting in XML example for TextInputLayout.
PiperOrigin-RevId: 155424482
2017-05-08 15:50:11 -07:00
afohrman
ef469ab452 Add documentation for TextInputLayout.
PiperOrigin-RevId: 155413910
2017-05-08 13:06:21 -07:00
dcarlsson
f37a53e9b6 Move component documentation under docs/ root.
PiperOrigin-RevId: 153763840
2017-04-24 16:14:48 -07:00