Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ViewHelper

Hierarchy

  • ViewHelper

Index

Constructors

constructor

Methods

Static combineMeasuredStates

  • combineMeasuredStates(curState: number, newState: any): number

Static layoutChild

  • layoutChild(parent: View, child: View, left: number, top: number, right: number, bottom: number): void
  • Layout a child by taking into account its margins, horizontal and vertical alignments and a given bounds.

    Parameters

    • parent: View

      This parameter is not used. You can pass null.

    • child: View
    • left: number

      Left position, relative to parent

    • top: number

      Top position, relative to parent

    • right: number

      Right position, relative to parent

    • bottom: number

      Bottom position, relative to parent

    Returns void

Static measureChild

  • measureChild(parent: View, child: View, widthMeasureSpec: number, heightMeasureSpec: number): object
  • Measure a child by taking into account its margins and a given measureSpecs.

    Parameters

    • parent: View

      This parameter is not used. You can pass null.

    • child: View

      The view to be measured.

    • widthMeasureSpec: number
    • heightMeasureSpec: number

    Returns object

    • measuredHeight: number

      The measured height that the parent layout specifies for this view.

    • measuredWidth: number

      The measured width that the parent layout specifies for this view.

Static resolveSizeAndState

  • resolveSizeAndState(size: number, specSize: number, specMode: number, childMeasuredState: number): number
  • Utility to reconcile a desired size and state, with constraints imposed by a MeasureSpec. Will take the desired size, unless a different size is imposed by the constraints. The returned value is a compound integer, with the resolved size in the MEASURED_SIZE_MASK bits and optionally the bit MEASURED_STATE_TOO_SMALL set if the resulting size is smaller than the size the view wants to be.

    Parameters

    • size: number
    • specSize: number
    • specMode: number
    • childMeasuredState: number

    Returns number

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method