1 / 20

To be an Android Expert

앱창작터. To be an Android Expert. 안드로이드 여대생 기초 과정. My Photo Gallery - Part 2. 문양세 , 최미정 강원대학교 IT 대학 컴퓨터학부. 단계별로 만들어 가요 ~. 단계 1: Image Viewer 단계 2 : Image Changer 단계 3: Image Slider 단계 4: Image Rotator 단계 5: Image Switcher. 체인져 레이아웃 및 XML 설계. FrameLayout (Vertical). ImageButton.

ilyssa
Télécharger la présentation

To be an Android Expert

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 앱창작터 To be an Android Expert • 안드로이드여대생 기초 과정 My Photo Gallery - Part 2 문양세, 최미정 강원대학교 IT대학 컴퓨터학부

  2. 단계별로 만들어 가요~ 단계1: Image Viewer 단계2: Image Changer 단계3: Image Slider 단계4: Image Rotator 단계5: Image Switcher

  3. 체인져 레이아웃 및 XML 설계 FrameLayout (Vertical) ImageButton

  4. 체인져액티비티– 설명 • ImageButton의 객체 ID(R.id.img_button)를 가져와 해당 버튼을 TransitionDrawable로 캐스트한 후,변환(transition)을 시작한다. 변환(transition)은 2초 동안 이루어진다. 레이아웃으로 ImageButton를 가진 my_changer.xml을 사용한다.

  5. 체인져액티비티– 코드

  6. drawble/image_transition.xml 변환이 일어나기 전의 첫 번째 이미지 변환이 끝날 때의 두 번째 이미지

  7. 메인 액티비티 수정 – 설명 & 코드 버튼(R.id.imgbtn_2)이 클릭되면, 체인져액티비티(MyChangerAct.class)를 시작한다.

  8. ManifestXML – 수정 새로운 Activity가 추가되었으므로, 이를 Manifest XML 파일에 등록하는 절차이다.

  9. 이제 Image Changer를 실행해 봐요~

  10. 단계별로 만들어 가요~ 단계1: Image Viewer 단계2: Image Changer 단계3: Image Slider 단계4: Image Rotator 단계5: Image Switcher

  11. 슬라이더 레이아웃 및 XML 설계 FrameLayout (Vertical) ImageView

  12. 슬라이더 액티비티– 설명 (1/2) • 레이아웃으로 ImageView를 가진 my_slider.xml을 사용한다. • ImageView의 객체 ID(R.id.img_imageview01)를 가져와 해당 이미지에 애니메이션(R.anim.beach_photos)를 붙인다. 애니메이션 수행을 위해, AnimationDrawable변수를 하나 선언한다.

  13. 슬라이더 액티비티– 설명 (2/2) 터치이벤트가 발생한 경우에, 애니메이션을 시작한다.

  14. 슬라이더 액티비티– 코드 (1/2)

  15. 슬라이더 액티비티– 코드 (2/2)

  16. anim/beach_photos.xml 이미지 beach1, ..., beach5가 1초 간격으로 변하며 화면에 나타난다.

  17. 메인 액티비티 수정 – 설명 & 코드 버튼(R.id.imgbtn_3)이 클릭되면, 슬라이더 액티비티(MySliderAct.class)를 시작한다.

  18. ManifestXML – 수정 새로운 Activity가 추가되었으므로, 이를 Manifest XML 파일에 등록하는 절차이다.

  19. 이제 Image Slider를 실행해 봐요~

More Related