当前位置: 编程技术>移动开发
本页文章导读:
▪uiview 图片动画片 uiview 图片动画
- (void)viewDidLoad {
// create the view that will execute our animation
UIImageView* campFireView = [[UIImageView alloc] initWithFrame:self.view.frame];
// load all the frames of our animation
campFireView.animationI.........
▪ 清空activity站以及查看全部安装程序 清空activity站以及查看所有安装程序
我想在用户进入一个activity之后 然后在去清空整个堆栈,而不能在登录的时候finish当钱这个
在之前的activity
manifest:
android:noHistory="true"
在每个活动中
publ.........
▪ bit地图内存溢出的有关问题 bitmap内存溢出的问题
我的代码如下
is = new FileInputStream(new File(baseMagazinePath + this.bookId + "/" + fileList[currentImgNo] + ".png")); iv.setImageDrawable(Drawable.createFromStream(is, "myStream"));
有时候出现内.........
[1]uiview 图片动画片
来源: 互联网 发布时间: 2014-02-18
uiview 图片动画
- (void)viewDidLoad { // create the view that will execute our animation UIImageView* campFireView = [[UIImageView alloc] initWithFrame:self.view.frame]; // load all the frames of our animation campFireView.animationImages = [NSArray arrayWithObjects: [UIImage imageNamed:@"campFire01.gif"], [UIImage imageNamed:@"campFire02.gif"], [UIImage imageNamed:@"campFire03.gif"], [UIImage imageNamed:@"campFire04.gif"], [UIImage imageNamed:@"campFire05.gif"], [UIImage imageNamed:@"campFire06.gif"], [UIImage imageNamed:@"campFire07.gif"], [UIImage imageNamed:@"campFire08.gif"], [UIImage imageNamed:@"campFire09.gif"], [UIImage imageNamed:@"campFire10.gif"], [UIImage imageNamed:@"campFire11.gif"], [UIImage imageNamed:@"campFire12.gif"], [UIImage imageNamed:@"campFire13.gif"], [UIImage imageNamed:@"campFire14.gif"], [UIImage imageNamed:@"campFire15.gif"], [UIImage imageNamed:@"campFire16.gif"], [UIImage imageNamed:@"campFire17.gif"], nil]; // all frames will execute in 1.75 seconds campFireView.animationDuration = 1.75; // repeat the annimation forever campFireView.animationRepeatCount = 0; // start animating [campFireView startAnimating]; // add the animation view to the main window [self.view addSubview:campFireView]; [campFireView release]; }
[2] 清空activity站以及查看全部安装程序
来源: 互联网 发布时间: 2014-02-18
清空activity站以及查看所有安装程序
我想在用户进入一个activity之后 然后在去清空整个堆栈,而不能在登录的时候finish当钱这个
在之前的activity
manifest:
android:noHistory="true" 在每个活动中
public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { Intent intent = new Intent(MyActivity.this, ParentActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION); startActivity(intent); return super.onKeyDown(keyCode, event); } return super.onKeyDown(keyCode, event); }
2final Intent mainIntent = new Intent(Intent.ACTION_MAIN, null); mainIntent.addCategory(Intent.CATEGORY_LAUNCHER); final List pkgAppsList = context.getPackageManager().queryIntentActivities( mainIntent, 0);
[3] bit地图内存溢出的有关问题
来源: 互联网 发布时间: 2014-02-18
bitmap内存溢出的问题
我的代码如下
is = new FileInputStream(new File(baseMagazinePath + this.bookId + "/" + fileList[currentImgNo] + ".png"));
iv.setImageDrawable(Drawable.createFromStream(is, "myStream"));
有时候出现内存溢出
改为
is = new FileInputStream(new File(baseMagazinePath + this.bookId + "/" + fileList[currentImgNo] + ".png"));
BitmapFactory.Options opts = new BitmapFactory.Options();
opts.inSampleSize = 4;
Bitmap bitmap = BitmapFactory.decodeStream(is, null, opts);
iv.setImageBitmap(bitmap);
就好了。
最新技术文章: