Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Unified Diff: ios/chrome/browser/ui/autofill/cells/autofill_edit_item.mm

Issue 2956433002: [Payment Request] keyboardType, autoCapitalizationType, etc for text fields (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/autofill/cells/autofill_edit_item.mm
diff --git a/ios/chrome/browser/ui/autofill/cells/autofill_edit_item.mm b/ios/chrome/browser/ui/autofill/cells/autofill_edit_item.mm
index c5941baa8d9371d8be054d8ec9354c463954de77..4b08a5f0f825f320fc0945e1b971f203ecfdd162 100644
--- a/ios/chrome/browser/ui/autofill/cells/autofill_edit_item.mm
+++ b/ios/chrome/browser/ui/autofill/cells/autofill_edit_item.mm
@@ -33,11 +33,17 @@ const CGFloat kLabelAndFieldGap = 5;
@synthesize textFieldEnabled = _textFieldEnabled;
@synthesize autofillUIType = _autofillUIType;
@synthesize required = _required;
+@synthesize returnKeyType = _returnKeyType;
+@synthesize keyboardType = _keyboardType;
+@synthesize autoCapitalizationType = _autoCapitalizationType;
- (instancetype)initWithType:(NSInteger)type {
self = [super initWithType:type];
if (self) {
self.cellClass = [AutofillEditCell class];
+ _returnKeyType = UIReturnKeyNext;
+ _keyboardType = UIKeyboardTypeDefault;
+ _autoCapitalizationType = UITextAutocapitalizationTypeWords;
}
return self;
}
@@ -62,6 +68,9 @@ const CGFloat kLabelAndFieldGap = 5;
action:@selector(textFieldChanged:)
forControlEvents:UIControlEventEditingChanged];
cell.textField.inputView = self.inputView;
+ cell.textField.returnKeyType = self.returnKeyType;
+ cell.textField.keyboardType = self.keyboardType;
+ cell.textField.autocapitalizationType = self.autoCapitalizationType;
cell.identifyingIconView.image = self.identifyingIcon;
}
@@ -104,9 +113,7 @@ const CGFloat kLabelAndFieldGap = 5;
_textField.font = [[MDCTypography fontLoader] lightFontOfSize:16];
_textField.textColor = [[MDCPalette greyPalette] tint500];
- _textField.autocapitalizationType = UITextAutocapitalizationTypeWords;
_textField.autocorrectionType = UITextAutocorrectionTypeNo;
- _textField.returnKeyType = UIReturnKeyDone;
_textField.clearButtonMode = UITextFieldViewModeWhileEditing;
_textField.contentVerticalAlignment =
UIControlContentVerticalAlignmentCenter;
@@ -180,9 +187,11 @@ const CGFloat kLabelAndFieldGap = 5;
[super prepareForReuse];
self.textLabel.text = nil;
self.textField.text = nil;
+ self.textField.returnKeyType = UIReturnKeyNext;
+ self.textField.keyboardType = UIKeyboardTypeDefault;
self.textField.autocapitalizationType = UITextAutocapitalizationTypeWords;
self.textField.autocorrectionType = UITextAutocorrectionTypeNo;
- self.textField.returnKeyType = UIReturnKeyDone;
+ self.textField.clearButtonMode = UITextFieldViewModeWhileEditing;
self.textField.accessibilityIdentifier = nil;
self.textField.enabled = NO;
self.textField.delegate = nil;
« no previous file with comments | « ios/chrome/browser/ui/autofill/cells/autofill_edit_item.h ('k') | ios/chrome/browser/ui/payments/address_edit_mediator.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698