----___<<<<< 2019. 10. 2. 22:43

일단 이미지 슬라이드 만들어줍니다.

 

저기 보이는 내맘대로 골라 더 맛있는 피자헛 어쩌고 하는 저 슬라이드를 만들어보겠습니다.

 

손가락으로 넘기면 쉭쉭 넘어가는 형태죠?

 

쒹쒹 넘어가도록 만들어보겠습니다.

 

일단 이미지파일들을 drawable 폴더에 넣어줍니다. 이미지 파일들은 모두 1-1 개요에서 받을 수 있습니다.

 

 

 

자, 그 다음 ViewPager를 만들어줍니다. xml파일로 와서

 

그리고 viewpager안에 들어갈 layout파일을 하나 만들어줍니다.

 

저는 viewpager_activity라고 해서 안에 imageview 영역을 만들어줬습니다.

 

 

그 다음 PagerAdapter를 만들어줍니다.

 

그 다음 Adapter를 연결해줍니다.

 

 

그러면 image slider가 완성이 됩니다.

 

 

자, 다음시간에 계속 해보겠습니다.

 

 

 

--참고

https://codingjuction.com/2018/12/13/how-to-make-image-slider-by-view-pager-in-the-android-studio-kotlin/

 

How to make Image Slider by view pager in the android studio(kotlin) ~ Coding Juction

Hi Guys, So, you have seen many popular android application with an image slider. Image Slider gives a professional look to your android app. So, let's learn "How to make Image Slider by view pager in the android studio(kotlin)"

codingjuction.com