本文整理汇总了Java中org.appcelerator.titanium.view.TiDrawableReference类的典型用法代码示例。如果您正苦于以下问题:Java TiDrawableReference类的具体用法?Java TiDrawableReference怎么用?Java TiDrawableReference使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TiDrawableReference类属于org.appcelerator.titanium.view包,在下文中一共展示了TiDrawableReference类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: makeImageSource
import org.appcelerator.titanium.view.TiDrawableReference; //导入依赖的package包/类
private TiDrawableReference makeImageSource(Object object)
{
if (object instanceof FileProxy) {
return TiDrawableReference.fromFile(this.getActivity(), ((FileProxy) object).getBaseFile());
} else if (object instanceof String) {
return TiDrawableReference.fromUrl(this, (String) object);
} else {
return TiDrawableReference.fromObject(this.getActivity(), object);
}
}
开发者ID:falkolab,项目名称:Ti.NotificationFactory,代码行数:11,代码来源:BigPictureStyleProxy.java
示例2: setBigPicture
import org.appcelerator.titanium.view.TiDrawableReference; //导入依赖的package包/类
@Kroll.method @Kroll.setProperty
public void setBigPicture(Object picture)
{
TiDrawableReference source = makeImageSource(picture);
// Check for decodeRetries
if (hasProperty(TiC.PROPERTY_DECODE_RETRIES)) {
source.setDecodeRetries(TiConvert.toInt(getProperty(TiC.PROPERTY_DECODE_RETRIES), TiDrawableReference.DEFAULT_DECODE_RETRIES));
}
((BigPictureStyle)style).bigPicture(source.getBitmap());
setProperty(NotificationfactoryModule.PROPERTY_BIG_PICTURE, picture);
}
开发者ID:falkolab,项目名称:Ti.NotificationFactory,代码行数:15,代码来源:BigPictureStyleProxy.java
示例3: handleImage
import org.appcelerator.titanium.view.TiDrawableReference; //导入依赖的package包/类
private void handleImage(Object val)
{
if (val instanceof TiBlob) {
// this is a blob, parse accordingly
TiBlob imgBlob = (TiBlob)val;
TiDrawableReference ref = TiDrawableReference.fromBlob(proxy.getActivity(), imgBlob);
tiv.setImageBitmap(ref.getBitmap());
} else {
String imgValue = (String)val;
tiv.setImageBitmap(loadImageFromApplication(imgValue));
}
}
开发者ID:iotashan,项目名称:TiTouchImageView,代码行数:13,代码来源:ViewProxy.java
示例4: drawImage
import org.appcelerator.titanium.view.TiDrawableReference; //导入依赖的package包/类
@Kroll.method
public void drawImage(Object image, float x, float y, float width, float height) {
TiDrawableReference ref = TiDrawableReference.fromObject(view.cView.proxy.getActivity(), image);
Bitmap bitmap = ref.getBitmap();
Paint paint = new Paint();
Rect src = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight());
RectF dst = new RectF(x, y, x + width, y + height);
view.cView.currentCanvas.drawBitmap(bitmap, src, dst, paint);
view.drawShape();
}
开发者ID:aalderi,项目名称:TiAndroidCanvas,代码行数:14,代码来源:CanvasViewProxy.java
示例5: setLargeIcon
import org.appcelerator.titanium.view.TiDrawableReference; //导入依赖的package包/类
@Kroll.method @Kroll.setProperty
public void setLargeIcon(TiBlob icon) {
TiDrawableReference ref = TiDrawableReference.fromBlob(getActivity(), icon);
notification.largeIcon = ref.getBitmap();
}
开发者ID:GregPerez83,项目名称:ti-gcm,代码行数:6,代码来源:GcmNotificationProxy.java
注:本文中的org.appcelerator.titanium.view.TiDrawableReference类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论