Anyone know how to add a "space" between the border and the helper/counter view? I been searching over the net and can't find any answer.
I'm using MaterialComponents 72.2.0
UPDATE
var noteController: MDCTextInputControllerOutlined!
...
override func viewDidLoad() {
super.viewDidLoad()
...
let scheme = MDCContainerScheme()
scheme.colorScheme.primaryColor = .orange
noteController = MDCTextInputControllerOutlined(textInput: noteField)
noteController.applyTheme(withScheme: scheme)
noteController.characterCountMax = 60
noteController.characterCountViewMode = .always
noteController.helperText = "Hello World"
...
}
I play around and found that if I remove noteController.applyTheme(withScheme: scheme)
the helper and character counter is being displayed correctly. I just follow the suggestion here which is to MDCContainerScheme
and MDCTextInputController.applyTheme(withScheme:)
to apply a custom theme to the MDCTextField
.
Another thing I found is, if I disable the character counter and only display the helper it is being display correctly.
For now I just removed the
noteController.applyTheme(withScheme: scheme)
and replace it with:I don't know why but it works fine if I use this.