LayoutInflater inflater =
getLayoutInflater();View imageLayout =
inflater.inflate(R.layout.preference_image.xml,null);ImageView imageView =
(ImageView...
分类:
其他好文 时间:
2014-05-08 21:34:32
阅读次数:
307
如果placeholderImage 为空的话,会出现显示不出下载的图片,应该给他一个展位图
[cell.imageView
setImageWithURL:imageUrl placeholderImage:nil options:SDWebImageLowPriority |
SDWebImageRetryFailed];
应该: [cell.imageView setI...
分类:
Web程序 时间:
2014-05-07 05:24:58
阅读次数:
685
[self.imageView sizeToFit];//根据图片自动调整大小
分类:
其他好文 时间:
2014-05-05 21:53:47
阅读次数:
188
1 //设置圆形cornerRadius,是宽或高的一半 2 3
_imageView.layer.masksToBounds = YES; 4 5 6 7 CGFloat w =
_imageView.frame.size.width / 2; 8 9 ...
分类:
移动开发 时间:
2014-05-05 12:06:59
阅读次数:
448
本文大部分内容来自《疯狂android讲义》.
QuickContactBadge继承了ImageView,因此它的本质也是图片,也可以通过android:src属性指定它显示的图片。QuickcontactBadge额外增加的功能是:该图片可以关联到手机中指定联系人,当用户单击该图片时,系统...
分类:
移动开发 时间:
2014-05-04 11:24:32
阅读次数:
388
启动界面的效果图:
实现的原理:在一个线程中让几幅图片进行循环显示,实现了动画的效果。
主要的实现类LoadingView是自定义控件,继承了ImageView,实现了Runnable接口 :
package wht.android.loading;
import android.content.Context;
import android.graphics.Canvas;
imp...
分类:
移动开发 时间:
2014-05-02 05:06:02
阅读次数:
371
相对某个控件进行布局
Size widgetSize = Director::getInstance()->getWinSize();
Text* alert = Text::create("Layout", "fonts/Marker Felt.ttf", 30 );
alert->setColor(Color3B(159, 168, 176)...
分类:
其他好文 时间:
2014-05-01 18:04:08
阅读次数:
503
iOS开发中访问相册摄像像头
源码下载地址http://download.csdn.net/detail/jingjingxujiayou/7270479
在AppDelegate.m文件中
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launch...
分类:
移动开发 时间:
2014-04-30 22:27:38
阅读次数:
497
android:scaleType可控制图片的缩放方式,示例代码如下:
1
ImageView android:id="@+id/img"
2
android:src="@drawable/logo"
3
android:scaleType="center...
分类:
其他好文 时间:
2014-04-29 13:44:20
阅读次数:
376
centerInside : 图片适应容器,图片按比例缩放,图片完全显示,图片大小会改变,如果图片大于窗器,那么左右或者上下会有边距。
fitCenter与centerInside类似。
fitStart:与fitCenter类似,不同的是,多出来的边距在右边。
fitEnd:与fitCenter类似,不同的是,多出来的边距在左边。
fixXY,图片大小会拉伸,宽高都会占满...
分类:
其他好文 时间:
2014-04-29 13:14:21
阅读次数:
338