안드로이드 개발 질문/답변
(글 수 45,052)
while(true) { 종료조건문. Bitmap bitmapOrg = BitmapFactory.decodeFile(getFilesDir().getPath()+"/"+path+".jpg"); if(bitmapOrg==null) continue; int width = 320; int height = 240; int reasonableDuration = 250; Matrix matrix = new Matrix(); Bitmap resizedBitmap = Bitmap.createBitmap(bitmapOrg, 0, 0, width, height, matrix, true); BitmapDrawable bmd = new BitmapDrawable(resizedBitmap); ImageView imageView = (ImageView)findViewById(R.id.ImageView01); mAnimation.addFrame(bmd, reasonableDuration); imageView.setBackgroundDrawable(mAnimation); } animation.setOneShot(false); animation.start();
while문 안에서 각각의 이미지를 Bitmap으로 읽어 와서 사이즈 320*240으로 조절한번 하고
각각 animation 프레임에 넣구 나서
while문 종료 후에 animation을 출력하는걸 짠건데요...
어디가 잘못 됐는지 모르겠어요..ㅠㅠ