Hierarchy

Properties

leftLayout: { view: IView<"touch" | "touchCancelled" | "touchEnded" | "touchMoved", { [key: string]: any }, MobileOSProps<ViewIOSProps, ViewAndroidProps>>; width: number; height?: number }

This property used to assign a view left of MaterialTextBox. The given view's width & height must be specified. This property does not work when multiline is true.

Property

Property

Property

Property

Android

Ios

Since

3.2.1

Type declaration

  • view: IView<"touch" | "touchCancelled" | "touchEnded" | "touchMoved", { [key: string]: any }, MobileOSProps<ViewIOSProps, ViewAndroidProps>>
  • width: number
  • Optional height?: number
rightLayoutLeftPadding: number

Gets/sets the rightLayoutLeftPadding of the MaterialTextBox.

Property

Ios

Since

4.3.0

leftLayoutRightPadding: number

Gets/sets the leftLayoutRightPadding of the MaterialTextBox.

Property

Ios

Since

4.3.0

inlineHintFont: IFont

Gets/sets the inlineHintFont of the MaterialTextBox. This property overrides the labelsFont property for characterRestriction. This property will not do anything.

Property

Ios

Deprecated

Since

4.3.0

underlineLabelsFont: IFont

Gets/sets the underlineLabelsFont of the MaterialTextBox. This property overrides the labelsFont property for error and characterRestriction font. This property will not do anything.

Property

Deprecated

Ios

Since

4.3.0

clearButtonColor: null | IColor

Gets/sets the clearButtonColor of the MaterialTextBox.

Property

Ios

Since

4.3.0

lineHeight: number

Gets/sets the lineHeight of the MaterialTextBox.

Property

Ios

Since

3.1.2

selectedLineHeight: number

Gets/sets the selectedLineHeight of the MaterialTextBox.

Property

Ios

Since

3.1.2

expandsOnOverflow: boolean

Gets/sets the expandsOnOverflow of the MaterialTextBox.

Property

Ios

Since

4.3.6

adjustFontSizeToFit: boolean

This property adjusts font size according to view's fixed width. If you set it true, you should set minimum font size by changing the minimumFontSize property. This property works only for iOS.

Property

= false]

Ios

Since

0.1

minimumFontSize: number

Gets/sets minimum font size of TextBox. This property works only for iOS.

Property

= 7]

Ios

Since

0.1

clearButtonEnabled?: boolean

Gets/sets the visibility of clear button. If enabled, clear button will be shown at right of the TextBox. This property works only for iOS only.

Property

= false]

Ios

Since

0.1

keyboardLayout?: IFlexLayout<"touch" | "touchCancelled" | "touchEnded" | "touchMoved" | "viewAdded" | "viewRemoved" | "interceptTouchEvent", MobileOSProps<FlexLayoutIOSProps, FlexLayoutAndroidProps>>

Gets/sets a layout to be displayed above the standard system keyboard when the textbox object became focus. This property works only for iOS only. Default is undefined.

Property

= undefined]

Ios

inputView?: { height: number; view: IView<"touch" | "touchCancelled" | "touchEnded" | "touchMoved", { [key: string]: any }, MobileOSProps<ViewIOSProps, ViewAndroidProps>> }

The custom input view to display instead of system keyboard when the textbox object became focus. This property works only for iOS only. Default is undefined.

Property

Property

Property

Ios

Type declaration

keyboardAppearance?: KeyboardAppearance

Gets/sets the appearance style of the keyboard that is associated with the TextBox. This property works only for iOS.

Property

= UI.KeyboardAppearance.DEFAULT]

Ios

Since

0.1

textContentType?: TextContentType

Use this property to give the keyboard and the system information about the expected semantic meaning for the content that users enter. This property works only for iOS.

Property

Ios

Creates a textContentType for ios.

Example

import TextContentType from '@smartface/native/ui/ios/textcontenttype';
import System from '@smartface/native/device/system';

if (System.OS == "iOS" && System.OSVersion >= 12){
textbox.ios.textContentType = TextContentType.ONETIMECODE;
}

Since

4.1.3

exclusiveTouch: boolean

Setting this property to TRUE causes the receiver to block the delivery of touch events to other views. The default value of this property is false

Property

= false]

Ios

Since

2.0.10

clipsToBounds: number

A Boolean value that determines whether subviews are confined to the bounds of the view.

Property

= false]

Ios

Since

1.1.15

masksToBounds: boolean

A Boolean value that determines whether subviews are confined to the bounds of the view.

Property

= false]

Deprecated

Use view.maskToBounds instead

Ios

Since

1.1.15

shadowOffset: Point2D

The offset (in points) of the shadow. This will set "masksToBounds" property to false.

Example

view.masksToBounds = false;
view.ios.shadowOffset = {x:10,y:10};
view.ios.shadowRadius = 5;
view.ios.shadowOpacity = 0.5;
view.ios.shadowColor = Color.GRAY;

Property

= {x: 0.0,y: -3.0}]

Property

Property

Ios

Since

2.0.6

shadowRadius: number

The blur radius (in points) used to render the shadow. masksToBounds" property must be false for shadow.

Property

= 3]

Ios

Since

2.0.6

shadowOpacity: number

The value in this property must be in the range 0.0 (transparent) to 1.0 (opaque). "masksToBounds" property must be false for shadow.

Property

= 0]

Ios

Since

2.0.6

shadowColor: IColor

The color of the shadow. "masksToBounds" property must be false for shadow.

Property

= UI.Color.BLACK]

Deprecated

Use UI.View#shadowColor

Ios

Since

2.0.6

viewAppearanceSemanticContentAttribute: SemanticContentAttribute

Changes the direction of unreachable child views of all components. These components are HeaderBar, BottomBar, Material Textbox, Searchview, SwipeView etc.

Property

= UI.View.iOS.SemanticContentAttribute.AUTO]

Ios

Static

Since

3.1.3

performWithoutAnimation: ((functionWithoutAnimation: Function) => void)

Type declaration

    • (functionWithoutAnimation: Function): void
    • Disables a view transition animation.

      Method

      performWithoutAnimation

      Ios

      Since

      4.2.1

      Parameters

      • functionWithoutAnimation: Function

      Returns void

Events

onLeftLayoutRectForBounds: ((bounds?: Object, defaultRect?: Object) => Object)

Type declaration

    • (bounds?: Object, defaultRect?: Object): Object
    • This event is called when positioning leftLayout. This event can be called multiple times.

      Returns

      Rect

      Returns

      return.x

      Returns

      return.y

      Returns

      return.width

      Returns

      return.height onLeftLayoutRectForBounds

      Deprecated

      Ios

      Since

      4.3.0

      Example

      import MaterialTextBox from '@smartface/native/ui/materialtextbox';

      const materialTextBox = new MaterialTextBox();
      materialTextBox.on(MaterialTextBox.Events.LeftLayoutRectForBounds, (params) => {
      console.info('onLeftLayoutRectForBounds', params);
      });

      Parameters

      • Optional bounds: Object

        MaterialTextBox bounds.

      • Optional defaultRect: Object

      Returns Object

onRightLayoutRectForBounds: ((bounds?: Object, defaultRect?: Object) => Object)

Type declaration

    • (bounds?: Object, defaultRect?: Object): Object
    • This event is called when positioning rightLayout. This event can be called multiple times.

      Returns

      Rect

      Returns

      return.x

      Returns

      return.y

      Returns

      return.width

      Returns

      return.height onRightLayoutRectForBounds

      Deprecated

      Ios

      Since

      4.3.0

      Example

      import MaterialTexBox from '@smartface/native/ui/materialtextbox';

      const materialTextBox = new MaterialTextBox();
      materialTextBox.on(MaterialTextBox.Events.RightLayoutRectForBounds, (params) => {
      console.info('onRightLayoutRectForBounds', params);
      });

      Parameters

      • Optional bounds: Object

        MaterialTextBox bounds.

      • Optional defaultRect: Object

      Returns Object

Generated using TypeDoc