本文整理汇总了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);
}
示例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();
}
}
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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();
}
}
示例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);
}
示例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);
}
示例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);
}
示例12: setExampleProp
import org.appcelerator.kroll.annotations.Kroll; //导入方法依赖的package包/类
@Kroll.setProperty
public void setExampleProp(String value) {
Log.d(LCAT, "set example property: " + value);
}
示例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);
}
示例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);
}
示例15: setTickerText
import org.appcelerator.kroll.annotations.Kroll; //导入方法依赖的package包/类
@Kroll.method @Kroll.setProperty
public void setTickerText(String tickerText)
{
notification.tickerText = tickerText;
}