Androidプログラミング初心者質問スレ Part7
■ このスレッドは過去ログ倉庫に格納されています
0012デフォルトの名無しさん
2011/04/03(日) 00:07:51.84動くには動くけどエミュレータしかないから動作が早くなったのかわからないんです
protected void onDraw(Canvas canvas){
if(image == null){
image = Zip.getBitmap(zipFileName, zipEntries[zipIndex]);
image = resizeBitmap(image);
}
int drawX = (getWidth() - image.getWidth()) / 2;
int drawY = (getHeight() - image.getHeight()) / 2;
canvas.drawBitmap(image, drawX, drawY, null);
thread = new Thread();
thread.start();
}
public void run(){
if(zipIndex == 0){
nextImage = Zip.getBitmap(zipFileName, zipEntries[zipIndex + 1]);
nextImage = resizeBitmap(nextImage);
}else if(zipIndex == zipEntries.length){
backImage = Zip.getBitmap(zipFileName, zipEntries[zipIndex - 1]);
backImage = resizeBitmap(backImage);
}else{
nextImage = Zip.getBitmap(zipFileName, zipEntries[zipIndex + 1]);
nextImage = resizeBitmap(nextImage);
backImage = Zip.getBitmap(zipFileName, zipEntries[zipIndex - 1]);
backImage = resizeBitmap(backImage);
}
}
■ このスレッドは過去ログ倉庫に格納されています