KeyboardType: { DEFAULT: number; NUMBER: number; DECIMAL: number; PHONE: number; URL: number; ios: { TWITTER: number; WEBSEARCH: number }; android: { DATETIME: number; SIGNEDNUMBER: number; SIGNEDDECIMAL: number; TEXTAUTOCOMPLETE: number; TEXTAUTOCORRECT: number; TEXTCAPCHARACTERS: number; TEXTCAPSENTENCES: number; TEXTCAPWORDS: number; TEXTEMAILSUBJECT: number; TEXTLONGMESSAGE: number; TEXTNOSUGGESTIONS: number; TEXTPERSONNAME: number; TEXTSHORTMESSAGE: number; TIME: number }; EMAILADDRESS: number; iOS: { TWITTER: number; WEBSEARCH: number } } = ...

Static

Since

0.1

KeyboardType is an enum. When user focused on the TextBox or TextArea keyboard appears with different layouts based on the KeyboardType such as number, email etc. Text based fields like TextBox or TextArea have different behaviors based on KeyboardType in iOS and Android. Android forces user to input data matched with KeyboardType but iOS doesn't. For example with KeyboardType.DECIMAL user can't enter 5.1.1 for Android because it's not a decimal number but can enter this number for iOS.

Keyboard types will cause differences between iOS and Android due to native differences. In Android, a few indicated enums are not supported with the usage of password.

Example

import TextBox from '@smartface/native/ui/textbox';
import KeyboardType from '@smartface/native/ui/keyboardtype';
const myTextBox = new TextBox({
height: 75,
width: 100,
hint: 'Smartface Hint',
keyboardType: KeyboardType.NUMBER,
isPassword: true
});

Type declaration

  • DEFAULT: number

    Default keyboard appearance.

    Android

    Ios

    Since

    0.1

  • NUMBER: number

    Numeric specific keyboard appearance.

    Android

    Ios

    Since

    0.1

  • DECIMAL: number

    Decimal specific keyboard appearance.

    Android

    Ios

    Since

    0.1

  • PHONE: number

    Phone number specific keyboard appearance.

    Android

    Ios

    Since

    0.1

  • URL: number

    URL address specific keyboard appearance

    Android

    Ios

    Since

    0.1

  • ios: { TWITTER: number; WEBSEARCH: number }
    • TWITTER: number

      Twitter specific keyboard appearance. This keyboard type works only for iOS.

      Ios

      Since

      0.1

      Deprecated

      3.2.0 UI.KeyboardType.iOS.TWITTER instead.

    • WEBSEARCH: number

      Web search specific keyboard appearance. This keyboard type works only for iOS.

      Ios

      Since

      0.1

      Deprecated

      3.2.0 UI.KeyboardType.iOS.WEBSEARCH instead.

  • android: { DATETIME: number; SIGNEDNUMBER: number; SIGNEDDECIMAL: number; TEXTAUTOCOMPLETE: number; TEXTAUTOCORRECT: number; TEXTCAPCHARACTERS: number; TEXTCAPSENTENCES: number; TEXTCAPWORDS: number; TEXTEMAILSUBJECT: number; TEXTLONGMESSAGE: number; TEXTNOSUGGESTIONS: number; TEXTPERSONNAME: number; TEXTSHORTMESSAGE: number; TIME: number }
    • DATETIME: number

      Date and time specific keyboard appearance. This keyboard type works only for Android.

      Android

      Since

      0.1

      Deprecated

      3.2.0 UI.KeyboardType.Android.DATETIME instead.

    • SIGNEDNUMBER: number

      Signed number specific keyboard appearance. This keyboard type works only for Android.

      Android

      Since

      0.1

      Deprecated

      3.2.0 UI.KeyboardType.Android.SIGNEDNUMBER instead.

    • SIGNEDDECIMAL: number

      Signed decimal specific keyboard appearance. This keyboard type works only for Android.

      Android

      Since

      0.1

      Deprecated

      3.2.0 UI.KeyboardType.Android.SIGNEDDECIMAL instead.

    • TEXTAUTOCOMPLETE: number

      Auto complete text specific keyboard appearance. This keyboard type works only for Android.

      Android

      Since

      0.1

      Deprecated

      3.2.0 UI.KeyboardType.Android.TEXTAUTOCOMPLETE instead.

    • TEXTAUTOCORRECT: number

      Auto correct text specific keyboard appearance. This keyboard type works only for Android.

      Android

      Since

      0.1

      Deprecated

      3.2.0 UI.KeyboardType.Android.TEXTAUTOCORRECT instead.

    • TEXTCAPCHARACTERS: number

      Auto capitalized characters specific keyboard appearance. This keyboard type works only for Android.

      Android

      Since

      0.1

      Deprecated

      3.2.0 UI.KeyboardType.Android.TEXTCAPCHARACTERS instead.

    • TEXTCAPSENTENCES: number

      Auto capitalized sentences specific keyboard appearance. This keyboard type works only for Android.

      Android

      Since

      0.1

      Deprecated

      3.2.0 UI.KeyboardType.Android.TEXTCAPSENTENCES instead.

    • TEXTCAPWORDS: number

      Auto capitalized word specific keyboard appearance. This keyboard type works only for Android.

      Android

      Since

      0.1

      Deprecated

      3.2.0 UI.KeyboardType.Android.TEXTCAPWORDS instead.

    • TEXTEMAILSUBJECT: number

      Email subject specific keyboard appearance. This keyboard type works only for Android. Setting the content as password is not supported.

      Android

      Since

      0.1

      Deprecated

      3.2.0 UI.KeyboardType.Android.TEXTEMAILSUBJECT instead.

    • TEXTLONGMESSAGE: number

      Long message specific keyboard appearance. This keyboard type works only for Android.

      Android

      Since

      0.1

      Deprecated

      3.2.0 UI.KeyboardType.Android.TEXTLONGMESSAGE instead.

    • TEXTNOSUGGESTIONS: number

      Text with no suggestion keyboard appearance. This keyboard type works only for Android.

      Android

      Since

      0.1

      Deprecated

      3.2.0 UI.KeyboardType.Android.TEXTNOSUGGESTIONS instead.

    • TEXTPERSONNAME: number

      Person name specific keyboard appearance. This keyboard type works only for Android.

      Android

      Since

      0.1

      Deprecated

      3.2.0 UI.KeyboardType.Android.TEXTPERSONNAME instead.

    • TEXTSHORTMESSAGE: number

      Short message specific keyboard appearance. This keyboard type works only for Android.

      Android

      Since

      0.1

      Deprecated

      3.2.0 UI.KeyboardType.Android.TEXTSHORTMESSAGE instead.

    • TIME: number

      Property

      Time specific keyboard appearance. This keyboard type works only for Android.

      Android

      Since

      0.1

      Deprecated

      3.2.0 UI.KeyboardType.Android.TIME instead.

  • EMAILADDRESS: number

    Email address specific keyboard appearance. In Android, setting the content as password is not supported.

    Android

    Ios

    Since

    0.1

  • iOS: { TWITTER: number; WEBSEARCH: number }
    • TWITTER: number

      Twitter specific keyboard appearance. This keyboard type works only for iOS.

      Ios

      Since

      3.2.1

    • WEBSEARCH: number

      Web search specific keyboard appearance. This keyboard type works only for iOS.

      Ios

      Since

      3.2.1

Generated using TypeDoc