當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。