AndroidJavaObject.Set.<FieldType> 设置域类型


function Set.<FieldType> (fieldName : string, val : FieldType) : void

Parameters参数

  • fieldName
    The name of the field (e.g. int counter; would have fieldName = "counter")
       域的名称。
  • val
    The value to assign to the field. It has to match the field type.
       指定到域的值,它必须匹配域类型。

Description描述

Set the value of a field in an object (non-static).

在一个对象上设置域的值(非静态)。

The generic parameter determines the field type.

一般参数定义域类型。

// Create a android.text.format.Time object, and set the 'allDay' field to true.//创建一个android.text.format.Time对象,并设置allDay域为truefunction Start() {var jo = new AndroidJavaObject("android.text.format.Time");var valueString = jo.Set.<bool>("allDay", true);}


,