Interface TextInputAndroidProps

Android Specific properties for TextInput

interface TextInputAndroidProps {
    cursorColor?: null | ColorValue;
    disableFullscreenUI?: boolean;
    importantForAutofill?: "auto" | "yes" | "no" | "noExcludeDescendants" | "yesExcludeDescendants";
    inlineImageLeft?: string;
    inlineImagePadding?: number;
    numberOfLines?: number;
    returnKeyLabel?: string;
    selectionHandleColor?: null | ColorValue;
    showSoftInputOnFocus?: boolean;
    textAlignVertical?: "center" | "auto" | "top" | "bottom";
    textBreakStrategy?: "balanced" | "simple" | "highQuality";
    underlineColorAndroid?: ColorValue;
    verticalAlign?: "auto" | "top" | "bottom" | "middle";
}

Hierarchy (view full)

Properties

cursorColor?: null | ColorValue

When provided it will set the color of the cursor (or "caret") in the component. Unlike the behavior of selectionColor the cursor color will be set independently from the color of the text selection box.

Platform

android

disableFullscreenUI?: boolean

When false, if there is a small amount of space available around a text input (e.g. landscape orientation on a phone), the OS may choose to have the user edit the text inside of a full screen text input mode. When true, this feature is disabled and users will always edit the text directly inside of the text input. Defaults to false.

importantForAutofill?: "auto" | "yes" | "no" | "noExcludeDescendants" | "yesExcludeDescendants"

Determines whether the individual fields in your app should be included in a view structure for autofill purposes on Android API Level 26+. Defaults to auto. To disable auto complete, use off.

Android Only

The following values work on Android only:

  • auto - let Android decide
  • no - not important for autofill
  • noExcludeDescendants - this view and its children aren't important for autofill
  • yes - is important for autofill
  • yesExcludeDescendants - this view is important for autofill but its children aren't
inlineImageLeft?: string

If defined, the provided image resource will be rendered on the left.

inlineImagePadding?: number

Padding between the inline image, if any, and the text input itself.

numberOfLines?: number

Sets the number of lines for a TextInput. Use it with multiline set to true to be able to fill the lines.

returnKeyLabel?: string

Sets the return key to the label. Use it instead of returnKeyType.

Platform

android

selectionHandleColor?: null | ColorValue

When provided it will set the color of the selection handles when highlighting text. Unlike the behavior of selectionColor the handle color will be set independently from the color of the text selection box.

Platform

android

showSoftInputOnFocus?: boolean

When false, it will prevent the soft keyboard from showing when the field is focused. The default value is true

textAlignVertical?: "center" | "auto" | "top" | "bottom"

Vertically align text when multiline is set to true

textBreakStrategy?: "balanced" | "simple" | "highQuality"

Set text break strategy on Android API Level 23+, possible values are simple, highQuality, balanced The default value is simple.

underlineColorAndroid?: ColorValue

The color of the textInput underline.

verticalAlign?: "auto" | "top" | "bottom" | "middle"

Vertically align text when multiline is set to true