当前位置: 首页>>代码示例>>Java>>正文


Java Kroll.setProperty方法代码示例

本文整理汇总了Java中org.appcelerator.kroll.annotations.Kroll.setProperty方法的典型用法代码示例。如果您正苦于以下问题:Java Kroll.setProperty方法的具体用法?Java Kroll.setProperty怎么用?Java Kroll.setProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.appcelerator.kroll.annotations.Kroll的用法示例。


在下文中一共展示了Kroll.setProperty方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setIcon

import org.appcelerator.kroll.annotations.Kroll; //导入方法依赖的package包/类
@Kroll.method @Kroll.setProperty
public void setIcon(Object icon)
{
	if (icon instanceof Number) {
		notificationBuilder.setSmallIcon(((Number)icon).intValue());
	} else {
		String iconUrl = TiConvert.toString(icon);
		if (iconUrl == null) {
			Log.e(TAG, "Url is null");
			return;
		}
		String iconFullUrl = resolveUrl(null, iconUrl);
		notificationBuilder.setSmallIcon(TiUIHelper.getResourceId(iconFullUrl));
	}
	setProperty(TiC.PROPERTY_ICON, icon);
}
 
开发者ID:falkolab,项目名称:Ti.NotificationFactory,代码行数:17,代码来源:NotificationProxy.java

示例2: setUserAgent

import org.appcelerator.kroll.annotations.Kroll; //导入方法依赖的package包/类
@Kroll.method @Kroll.setProperty
public void setUserAgent(String userAgent)
{
	TiUIWebView currWebView = getWebView();
	if (currWebView != null) {
		if (TiApplication.isUIThread()) {
			currWebView.setUserAgentString(userAgent);
		} else {
			Message message = getMainHandler().obtainMessage(MSG_SET_USER_AGENT);
			message.obj = userAgent;
			message.sendToTarget();
		}
	}
}
 
开发者ID:chreck,项目名称:movento-webview,代码行数:15,代码来源:WebViewProxy.java

示例3: setPluginState

import org.appcelerator.kroll.annotations.Kroll; //导入方法依赖的package包/类
@Kroll.method @Kroll.setProperty
public void setPluginState(int pluginState)
{
	switch (pluginState) {
		case TiUIWebView.PLUGIN_STATE_OFF:
		case TiUIWebView.PLUGIN_STATE_ON:
		case TiUIWebView.PLUGIN_STATE_ON_DEMAND:
			setPropertyAndFire(TiC.PROPERTY_PLUGIN_STATE, pluginState);
			break;
		default:
			setPropertyAndFire(TiC.PROPERTY_PLUGIN_STATE, TiUIWebView.PLUGIN_STATE_OFF);
	}
}
 
开发者ID:chreck,项目名称:movento-webview,代码行数:14,代码来源:WebViewProxy.java

示例4: setVisibility

import org.appcelerator.kroll.annotations.Kroll; //导入方法依赖的package包/类
@Kroll.method @Kroll.setProperty
public void setVisibility(int visibility)
{
	notificationBuilder.setVisibility(visibility);
	setProperty(TiC.PROPERTY_VISIBILITY, visibility);

}
 
开发者ID:falkolab,项目名称:Ti.NotificationFactory,代码行数:8,代码来源:NotificationProxy.java

示例5: setTickerText

import org.appcelerator.kroll.annotations.Kroll; //导入方法依赖的package包/类
@Kroll.method @Kroll.setProperty
public void setTickerText(String tickerText)
{
	notificationBuilder.setTicker(tickerText);
	//set the javascript object
	setProperty(TiC.PROPERTY_TICKER_TEXT, tickerText);
}
 
开发者ID:falkolab,项目名称:Ti.NotificationFactory,代码行数:8,代码来源:NotificationProxy.java

示例6: setLedOffMS

import org.appcelerator.kroll.annotations.Kroll; //导入方法依赖的package包/类
@Kroll.method @Kroll.setProperty
public void setLedOffMS(int ledOffMS)
{
	this.ledOffMS = ledOffMS;
	notificationBuilder.setLights(ledARGB, ledOnMS, this.ledOffMS);
	setProperty(TiC.PROPERTY_LED_OFF_MS, ledOffMS);
}
 
开发者ID:falkolab,项目名称:Ti.NotificationFactory,代码行数:8,代码来源:NotificationProxy.java

示例7: setLedARGB

import org.appcelerator.kroll.annotations.Kroll; //导入方法依赖的package包/类
@Kroll.method @Kroll.setProperty
public void setLedARGB(int ledARGB)
{
	this.ledARGB = ledARGB;
	notificationBuilder.setLights(this.ledARGB, ledOnMS, ledOffMS);
	setProperty(TiC.PROPERTY_LED_ARGB, ledARGB);
}
 
开发者ID:falkolab,项目名称:Ti.NotificationFactory,代码行数:8,代码来源:NotificationProxy.java

示例8: setUrl

import org.appcelerator.kroll.annotations.Kroll; //导入方法依赖的package包/类
@Kroll.setProperty @Kroll.method
public void setUrl(String url) {
	if (url != null) {
		setProperty(TiC.PROPERTY_URL, resolveUrl(null, TiConvert.toString(url)));
		release();
		getSound();
	}
}
 
开发者ID:DesktopSolutionsSoftware,项目名称:android-audioplayer,代码行数:9,代码来源:AudioPlayerProxy.java

示例9: setVibratePattern

import org.appcelerator.kroll.annotations.Kroll; //导入方法依赖的package包/类
@Kroll.method @Kroll.setProperty
public void setVibratePattern(Object[] pattern)
{
	if (pattern != null) {
		long[] vibrate = new long[pattern.length];
		for (int i = 0; i < pattern.length; i++) {
			vibrate[i] = ((Double)TiConvert.toDouble(pattern[i])).longValue();
		}
		notificationBuilder.setVibrate(vibrate);
	}
	setProperty(TiC.PROPERTY_VIBRATE_PATTERN, pattern);
}
 
开发者ID:falkolab,项目名称:Ti.NotificationFactory,代码行数:13,代码来源:NotificationProxy.java

示例10: setEnableZoomControls

import org.appcelerator.kroll.annotations.Kroll; //导入方法依赖的package包/类
@Kroll.method(runOnUiThread=true) @Kroll.setProperty(runOnUiThread=true)
public void setEnableZoomControls(boolean enabled)
{
	setPropertyAndFire(TiC.PROPERTY_ENABLE_ZOOM_CONTROLS, enabled);
}
 
开发者ID:chreck,项目名称:movento-webview,代码行数:6,代码来源:WebViewProxy.java

示例11: setFlags

import org.appcelerator.kroll.annotations.Kroll; //导入方法依赖的package包/类
@Kroll.method @Kroll.setProperty
public void setFlags(int flags)
{
	this.flags = flags;
	setProperty(TiC.PROPERTY_FLAGS, flags);
}
 
开发者ID:falkolab,项目名称:Ti.NotificationFactory,代码行数:7,代码来源:NotificationProxy.java

示例12: setExampleProp

import org.appcelerator.kroll.annotations.Kroll; //导入方法依赖的package包/类
@Kroll.setProperty
public void setExampleProp(String value) {
	Log.d(LCAT, "set example property: " + value);
}
 
开发者ID:E2010,项目名称:android-parse-module-titanium-3-5,代码行数:5,代码来源:AndroidTitaniumParseModule.java

示例13: setMessage

import org.appcelerator.kroll.annotations.Kroll; //导入方法依赖的package包/类
@Kroll.setProperty @Kroll.method
public void setMessage(String message)
{
    Log.d(LCAT, "Tried setting module message to: " + message);
}
 
开发者ID:falkolab,项目名称:Ti.NotificationFactory,代码行数:6,代码来源:ExampleProxy.java

示例14: setSummaryText

import org.appcelerator.kroll.annotations.Kroll; //导入方法依赖的package包/类
@Kroll.method @Kroll.setProperty
public void setSummaryText(String cs) {	
	((BigPictureStyle)style).setSummaryText(cs);
	setProperty(NotificationfactoryModule.PROPERTY_SUMMARY_TEXT, cs);
}
 
开发者ID:falkolab,项目名称:Ti.NotificationFactory,代码行数:6,代码来源:BigPictureStyleProxy.java

示例15: setTickerText

import org.appcelerator.kroll.annotations.Kroll; //导入方法依赖的package包/类
@Kroll.method @Kroll.setProperty
public void setTickerText(String tickerText)
{
    notification.tickerText = tickerText;
}
 
开发者ID:GregPerez83,项目名称:ti-gcm,代码行数:6,代码来源:GcmNotificationProxy.java


注:本文中的org.appcelerator.kroll.annotations.Kroll.setProperty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。