2011-09-26 6 views
0

ImageView를 사용하여 이미지의 슬라이드 쇼를 만드는 방법을 알아야합니다. 이미지 파일의 이름이 배열에서로드됩니다. 지금까지 나는 이것을 시도했다 :ImageViewe로 슬라이드 쇼 만들기 - Android

for(i=0;i<bL.length;i++){ 

imgView.setImageBitmap(bitmap); 
a = new TranslateAnimation(
         Animation.RELATIVE_TO_PARENT, +1.0f, 
         Animation.RELATIVE_TO_PARENT, 0.0f, 
         Animation.RELATIVE_TO_PARENT, 0.0f, 
         Animation.RELATIVE_TO_PARENT, 0.0f); 
a.setDuration(5000); 

imgView.startAnimation(a); 

} 

그러나 전체 애니메이션을 보지 못하고 배열의 마지막 이미지 만로드 할 수 있었다.

도움 주셔서 감사합니다.

+0

갤러리 위젯을 보았습니까? – JesusFreke

+0

이미지 뷰는 한 번에 하나의 이미지 만 보유합니다. 이 SO 응답은 도움이 될 수 있습니다 - http://stackoverflow.com/questions/3373536/using-the-android-gallery-as-an-automated-slideshow/3376203#3376203 – Raunak

+0

이미지 그룹을 계속 슬라이드하려고합니까? – blessenm

답변

0

이 특정 프로젝트에는 Gallery Wigdet을 사용해야합니다.