Class TextFormConfiguration.Builder
-
- All Implemented Interfaces:
public class TextFormConfiguration.Builder extends FormElementConfiguration.BaseBuilder<V, B>
Builder used to construct TextFormConfiguration instance.
-
-
Constructor Summary
Constructors Constructor Description TextFormConfiguration.Builder(int pageIndex, RectF boundingBox)
Creates a new TextFormConfiguration builder.
-
Method Summary
Modifier and Type Method Description TextFormConfiguration.Builder
setMultiLine(boolean isMultiLine)
Sets whether text is allowed to have multiple lines or not. TextFormConfiguration.Builder
setPassword(boolean isPassword)
Sets whether text is intended for entering a secure password that should not be visible on the screen. TextFormConfiguration.Builder
setSpellCheckEnabled(boolean isSpellCheckEnabled)
Sets whether text entered in the field shall be spell-checked, defaults to true
.TextFormConfiguration.Builder
setScrollEnabled(boolean isScrollEnabled)
Sets whether the text field can be scrolled (horizontally for single-line fields, vertically for multi-line fields), defaults to true
.TextFormConfiguration
build()
Creates a TextFormConfiguration with the arguments supplied to this builder. TextFormConfiguration.Builder
setText(@Nullable() String text)
Sets text contents. TextFormConfiguration.Builder
setRichText(@Nullable() String richText)
Sets rich text contents. TextFormConfiguration.Builder
setMaxLength(@IntRange(from = 0) int maxLength)
Sets the maximum length of text allowed in the text field. -
-
Constructor Detail
-
TextFormConfiguration.Builder
TextFormConfiguration.Builder(int pageIndex, RectF boundingBox)
Creates a new TextFormConfiguration builder.- Parameters:
pageIndex
- Page index where the checkbox form element will be attached.boundingBox
- Annotation bounding box of the widget annotation representing the appearance of the checkbox form element.
-
-
Method Detail
-
setMultiLine
TextFormConfiguration.Builder setMultiLine(boolean isMultiLine)
Sets whether text is allowed to have multiple lines or not.
- Parameters:
isMultiLine
-true
when text is allowed to span multiple lines.
-
setPassword
TextFormConfiguration.Builder setPassword(boolean isPassword)
Sets whether text is intended for entering a secure password that should not be visible on the screen.
- Parameters:
isPassword
-true
when text should be not echoed on screen.
-
setSpellCheckEnabled
TextFormConfiguration.Builder setSpellCheckEnabled(boolean isSpellCheckEnabled)
Sets whether text entered in the field shall be spell-checked, defaults to
true
.- Parameters:
isSpellCheckEnabled
-true
when text content should be spell checked.
-
setScrollEnabled
TextFormConfiguration.Builder setScrollEnabled(boolean isScrollEnabled)
Sets whether the text field can be scrolled (horizontally for single-line fields, vertically for multi-line fields), defaults to
true
. If scrolling is disabled, user input to the field is limited to the available visible space of the form element. For programmatic access, the application has to take care of respecting the maximum input.- Returns:
true
when text scrolling is enabled.
-
build
@NonNull() TextFormConfiguration build()
Creates a TextFormConfiguration with the arguments supplied to this builder.
- Returns:
Newly created configuration.
-
setText
TextFormConfiguration.Builder setText(@Nullable() String text)
Sets text contents.
- Parameters:
text
- Text contents to be set.
-
setRichText
TextFormConfiguration.Builder setRichText(@Nullable() String richText)
Sets rich text contents.
- Parameters:
richText
- Rich text contents to be set.
-
setMaxLength
TextFormConfiguration.Builder setMaxLength(@IntRange(from = 0) int maxLength)
Sets the maximum length of text allowed in the text field.
- Parameters:
maxLength
- Maximum length of text allowed or 0 if length is unlimited.
-
-
-
-