Packageorg.zengrong.ane.tool
Classpublic class PreferenceCont
InheritancePreferenceCont Inheritance ToolBase Inheritance flash.events.EventDispatcher

提供对Android中的SharedPreference的调用方法 AIR中的SharedObject保存的格式对于Android来说无法识别。 AIR和Android都需要访问的共享数据,应该使用SHaredPreference来保存。



Public Properties
 PropertyDefined By
 Inheritedextension : ExtensionContext
[read-only]
ToolBase
Protected Properties
 PropertyDefined By
 Inherited_extension : ExtensionContext
ToolBase
Public Methods
 MethodDefined By
  
PreferenceCont($context:ExtensionContext)
PreferenceCont
 Inherited
dispose():void
ToolBase
  
getValue($settingName:String, $keyType:String, $keyName:String):*
获取保存的值
PreferenceCont
  
setValue($settingName:String, $keyType:String, $keyName:String, $value:*):void
获取保存的值
PreferenceCont
Protected Methods
 MethodDefined By
 Inherited
handler_status($evt:StatusEvent):void
ToolBase
Constructor Detail
PreferenceCont()Constructor
public function PreferenceCont($context:ExtensionContext)



Parameters
$context:ExtensionContext
Method Detail
getValue()method
public function getValue($settingName:String, $keyType:String, $keyName:String):*

获取保存的值

Parameters

$settingName:String — 保存的对象的名称
 
$keyType:String — 值的类型
 
$keyName:String — 值的名称 如果值不存在,对于int来说,将返回-1;对于字符串类型来说,将返回空字符串

Returns
*
setValue()method 
public function setValue($settingName:String, $keyType:String, $keyName:String, $value:*):void

获取保存的值

Parameters

$settingName:String — 保存的对象的名称
 
$keyType:String — 值的类型
 
$keyName:String — 值的名称
 
$value:* — 要保存的值