Commit ac598af
Android autofill: bump to 1.3.0 and add extended hints (facebook#56105)
Summary:
This change expands Android `TextInput` autofill support by aligning React Native with newer AndroidX autofill APIs and exposing additional `autoComplete` values backed by official `androidx.autofill.HintConstants`.
What changed:
- Bumped AndroidX Autofill dependency from `1.1.0` to `1.3.0`.
- Added Android native mappings in `ReactTextInputManager` for:
- `2fa-app-otp`
- `email-otp`
- `wifi-password`
- `upi-vpa`
- `postal-address-unit`
- `postal-address-dependent-locality`
- `promo-code`
- `flight-number`
- `flight-confirmation-code`
- `gift-card-number`
- `gift-card-pin`
- `loyalty-account-number`
- Updated public `TextInput` type/docs surfaces (`Flow`, `TypeScript`, and Android native component props) to include the new Android values.
- Added Android unit test coverage for the extended hint mappings.
- Added RNTester Android examples for the new `autoComplete` values.
## Changelog:
[ANDROID] [ADDED] - Add extended Android `TextInput` `autoComplete` autofill hint support and bump `androidx.autofill` to `1.3.0`.
Pull Request resolved: facebook#56105
Test Plan:
Ran Android unit tests locally:
```bash
./gradlew :packages:react-native:ReactAndroid:testDebugUnitTest --tests com.facebook.react.views.textinput.ReactTextInputPropertyTest
```
Run `rn-tester`
<img width="473" height="864" alt="image" src="https://github.com/user-attachments/assets/21b779d9-b485-47e9-809b-d9917e12b472" />
Reviewed By: cortinico, javache
Differential Revision: D96952637
Pulled By: NickGerleman
fbshipit-source-id: e01c99bfa4411219a73fb586b873b1f86ea281221 parent b1e2e5a commit ac598af
8 files changed
Lines changed: 176 additions & 4 deletions
File tree
- packages
- react-native
- Libraries/Components/TextInput
- ReactAndroid/src
- main/java/com/facebook/react/views/textinput
- test/java/com/facebook/react/views/textinput
- gradle
- rn-tester/js/examples/TextInput
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
93 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
94 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
95 | 102 | | |
96 | 103 | | |
97 | 104 | | |
| |||
103 | 110 | | |
104 | 111 | | |
105 | 112 | | |
| 113 | + | |
106 | 114 | | |
107 | 115 | | |
108 | 116 | | |
109 | 117 | | |
| 118 | + | |
110 | 119 | | |
| 120 | + | |
111 | 121 | | |
112 | 122 | | |
113 | 123 | | |
114 | 124 | | |
115 | 125 | | |
116 | 126 | | |
| 127 | + | |
| 128 | + | |
117 | 129 | | |
118 | 130 | | |
119 | 131 | | |
120 | 132 | | |
121 | 133 | | |
122 | 134 | | |
123 | 135 | | |
| 136 | + | |
124 | 137 | | |
125 | 138 | | |
126 | 139 | | |
| |||
132 | 145 | | |
133 | 146 | | |
134 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
135 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
136 | 155 | | |
137 | 156 | | |
138 | 157 | | |
| |||
144 | 163 | | |
145 | 164 | | |
146 | 165 | | |
| 166 | + | |
147 | 167 | | |
148 | 168 | | |
149 | 169 | | |
150 | 170 | | |
| 171 | + | |
151 | 172 | | |
| 173 | + | |
152 | 174 | | |
153 | 175 | | |
154 | 176 | | |
155 | 177 | | |
156 | 178 | | |
157 | 179 | | |
| 180 | + | |
| 181 | + | |
158 | 182 | | |
159 | 183 | | |
160 | 184 | | |
| |||
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
632 | 632 | | |
633 | 633 | | |
634 | 634 | | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
635 | 639 | | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
636 | 643 | | |
637 | 644 | | |
638 | 645 | | |
| |||
643 | 650 | | |
644 | 651 | | |
645 | 652 | | |
| 653 | + | |
646 | 654 | | |
647 | 655 | | |
648 | 656 | | |
649 | 657 | | |
| 658 | + | |
| 659 | + | |
650 | 660 | | |
651 | 661 | | |
652 | 662 | | |
653 | 663 | | |
| 664 | + | |
| 665 | + | |
654 | 666 | | |
655 | 667 | | |
656 | 668 | | |
| 669 | + | |
657 | 670 | | |
658 | 671 | | |
659 | 672 | | |
| |||
675 | 688 | | |
676 | 689 | | |
677 | 690 | | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
678 | 694 | | |
679 | 695 | | |
| 696 | + | |
| 697 | + | |
680 | 698 | | |
681 | 699 | | |
682 | 700 | | |
| 701 | + | |
683 | 702 | | |
684 | 703 | | |
685 | 704 | | |
| |||
696 | 715 | | |
697 | 716 | | |
698 | 717 | | |
| 718 | + | |
699 | 719 | | |
700 | 720 | | |
701 | 721 | | |
702 | 722 | | |
| 723 | + | |
703 | 724 | | |
| 725 | + | |
704 | 726 | | |
705 | 727 | | |
706 | 728 | | |
707 | 729 | | |
708 | 730 | | |
709 | 731 | | |
| 732 | + | |
710 | 733 | | |
| 734 | + | |
711 | 735 | | |
712 | 736 | | |
713 | 737 | | |
| |||
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
597 | 601 | | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
598 | 605 | | |
599 | 606 | | |
600 | 607 | | |
| |||
605 | 612 | | |
606 | 613 | | |
607 | 614 | | |
| 615 | + | |
608 | 616 | | |
609 | 617 | | |
610 | 618 | | |
611 | 619 | | |
| 620 | + | |
| 621 | + | |
612 | 622 | | |
613 | 623 | | |
614 | 624 | | |
615 | 625 | | |
| 626 | + | |
| 627 | + | |
616 | 628 | | |
617 | 629 | | |
618 | 630 | | |
| 631 | + | |
619 | 632 | | |
620 | 633 | | |
621 | 634 | | |
| |||
637 | 650 | | |
638 | 651 | | |
639 | 652 | | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
640 | 656 | | |
641 | 657 | | |
| 658 | + | |
| 659 | + | |
642 | 660 | | |
643 | 661 | | |
644 | 662 | | |
| 663 | + | |
645 | 664 | | |
646 | 665 | | |
647 | 666 | | |
| |||
658 | 677 | | |
659 | 678 | | |
660 | 679 | | |
| 680 | + | |
661 | 681 | | |
662 | 682 | | |
663 | 683 | | |
664 | 684 | | |
| 685 | + | |
665 | 686 | | |
| 687 | + | |
666 | 688 | | |
667 | 689 | | |
668 | 690 | | |
669 | 691 | | |
670 | 692 | | |
671 | 693 | | |
| 694 | + | |
672 | 695 | | |
| 696 | + | |
673 | 697 | | |
674 | 698 | | |
675 | 699 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1056 | 1056 | | |
1057 | 1057 | | |
1058 | 1058 | | |
| 1059 | + | |
1059 | 1060 | | |
1060 | 1061 | | |
1061 | 1062 | | |
| |||
1067 | 1068 | | |
1068 | 1069 | | |
1069 | 1070 | | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
1070 | 1074 | | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
1071 | 1078 | | |
1072 | 1079 | | |
1073 | 1080 | | |
| |||
1079 | 1086 | | |
1080 | 1087 | | |
1081 | 1088 | | |
| 1089 | + | |
| 1090 | + | |
1082 | 1091 | | |
1083 | 1092 | | |
1084 | 1093 | | |
1085 | 1094 | | |
1086 | 1095 | | |
1087 | 1096 | | |
| 1097 | + | |
1088 | 1098 | | |
| 1099 | + | |
1089 | 1100 | | |
1090 | 1101 | | |
1091 | 1102 | | |
1092 | 1103 | | |
1093 | 1104 | | |
1094 | 1105 | | |
| 1106 | + | |
| 1107 | + | |
1095 | 1108 | | |
1096 | 1109 | | |
1097 | 1110 | | |
| |||
Lines changed: 33 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
214 | 216 | | |
215 | 217 | | |
216 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
217 | 250 | | |
218 | 251 | | |
219 | 252 | | |
| |||
0 commit comments