SlideShare une entreprise Scribd logo
1  sur  16
Télécharger pour lire hors ligne
View Pager Training
2014/03/25 John Lu
Outline
● Introduction
● Design
○ PagerIndicator
● How to implement
○ PageTransfomer
● Summary
● Homework
Introduction
ViewPager is a LayoutManager that allows the
user to flip left and right through pages of data.
Introduction
ViewPager was released as part of the
Compatibility Package revision 3 and works
with Android 1.6 upwards.
ViewPager is a ViewGroup and works in a
similar manner to AdapterViews (like ListView
and Gallery) so it shouldn’t feel too foreign.
ref: http://goo.gl/SgWOUw
Introduction
Design
Example: Unlimited swipable page
● ViewPager
● PageAdapter
● PageTransformer
Design
CircularViewPager
● Two virtual page:
Right and Left
● Swipe to virtual page
upon to set it back. RIGHTLEFT
Design
PageAdapter
● Fragment pager adapter
● Instantiate a fragment when showing it.
Design
PageTransformer
● While it is instantiated,
transforming with PageTransformer.
● Depth animation fades the page out,
and scales it down linearly.
Design - PagerIndicator
ViewPager widget it
is not always obvious
to the user that there
are adjacent views
they can navigate to.
http://viewpagerindicator.com/
Jake Wharton
Design
Android Design in Action:
Common UX Issues
Streamed live on Sep 10, 2013
Join Nick Butcher, Adam Koch and Roman
Nurik as they discuss various elements of
Android Design. This week, we'll run
through a top-ten-style list of the most
common user experience issues we've
observed during app review.
Slides can be found here: https://plus.
google.
com/+RomanNurik/posts/6PwgQPMvK1p
Youtube: http://goo.gl/ujyWvy
How to implement
● Implement a OnPageChangeListener (Trick)
We can’t deal with something here
because it calls back meanwhile
scrolling.
We need to know when does it finish
scrolling.
How to implement
PagerTransformer
● Implement DepthPagerTransformer.
● Override the transfromPage method.
● Transform every child item with position.
N - 1 N + 1N
Position: -1 0 1
How to implement
● scaleFactor: [MIN_SCALE, 1]
● Centre: pageWidth * -position
Scale: MIN_SCALE + (1 - MIN_SCALE) * (1 - position)
Alpha: 1 - position
N - 1 N + 1N
Position: -1 0 1
Summary
● Where can we apply ViewPager
● How does ViewPager to work
● Transform Pager by using PagerTransformer
Demo:
Homework
Sample source code: (You can also fInd it at the video record nearby if this link is invalid.)
https://www.dropbox.com/s/jtrn6iph2htcmyy/TrainingViewPager.zip
Basic:
● Vertically swiping view pager
Advance:
● Customize a view pager that can
parameterlize the velocity, delay time,
duration, etc,.

Contenu connexe

Similaire à Android Training - View Pager

Google I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and JetpackGoogle I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and JetpackSunita Singh
 
Responsive Design: Building for a Modern Web
Responsive Design: Building for a Modern WebResponsive Design: Building for a Modern Web
Responsive Design: Building for a Modern WebHarvard Web Working Group
 
OutSystems Webinar - Troubleshooting Mobile Apps Performance
OutSystems Webinar - Troubleshooting Mobile Apps PerformanceOutSystems Webinar - Troubleshooting Mobile Apps Performance
OutSystems Webinar - Troubleshooting Mobile Apps PerformanceDaniel Reis
 
Training Webinar: Troubleshooting Mobile Apps Performance
Training Webinar: Troubleshooting Mobile Apps Performance Training Webinar: Troubleshooting Mobile Apps Performance
Training Webinar: Troubleshooting Mobile Apps Performance OutSystems
 
Javascript & SEO 2019
Javascript & SEO 2019Javascript & SEO 2019
Javascript & SEO 2019Edd Wilson
 
Responsive Design: Let's get Responsive!
Responsive Design: Let's get Responsive!Responsive Design: Let's get Responsive!
Responsive Design: Let's get Responsive!Courtney Jordan
 
Burgas Conf 21.06.2014 - Single page application Angularjs and Nodejs
Burgas Conf 21.06.2014 - Single page application Angularjs and NodejsBurgas Conf 21.06.2014 - Single page application Angularjs and Nodejs
Burgas Conf 21.06.2014 - Single page application Angularjs and NodejsDimitar Danailov
 
20190826 ianjoseph_FinalPresentation
20190826 ianjoseph_FinalPresentation20190826 ianjoseph_FinalPresentation
20190826 ianjoseph_FinalPresentationIan Joseph
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web AppsGbolahan Alli
 
MVP vs MVVM : a fast introduction
MVP vs MVVM : a fast introductionMVP vs MVVM : a fast introduction
MVP vs MVVM : a fast introductionMatteo Pierro
 
Foster - Getting started with Angular
Foster - Getting started with AngularFoster - Getting started with Angular
Foster - Getting started with AngularMukundSonaiya1
 
Android Training - Sliding Menu
Android Training - Sliding MenuAndroid Training - Sliding Menu
Android Training - Sliding MenuKan-Han (John) Lu
 
[JogjaJS] Single Page Application nganggo Angular.js
[JogjaJS] Single Page Application nganggo Angular.js [JogjaJS] Single Page Application nganggo Angular.js
[JogjaJS] Single Page Application nganggo Angular.js Yanuar W
 
Advanced Techniques for Testing Responsive Apps and Sites -- By Aakrit Prasad
 Advanced Techniques for Testing Responsive Apps and Sites -- By Aakrit Prasad Advanced Techniques for Testing Responsive Apps and Sites -- By Aakrit Prasad
Advanced Techniques for Testing Responsive Apps and Sites -- By Aakrit PrasadApplitools
 
9 Useful Things that Every Web Developer Needs to Know
9 Useful Things that Every Web Developer Needs to Know9 Useful Things that Every Web Developer Needs to Know
9 Useful Things that Every Web Developer Needs to KnowSimobo
 

Similaire à Android Training - View Pager (20)

AngularJS to React
AngularJS to ReactAngularJS to React
AngularJS to React
 
Google I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and JetpackGoogle I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and Jetpack
 
Responsive Design: Building for a Modern Web
Responsive Design: Building for a Modern WebResponsive Design: Building for a Modern Web
Responsive Design: Building for a Modern Web
 
OutSystems Webinar - Troubleshooting Mobile Apps Performance
OutSystems Webinar - Troubleshooting Mobile Apps PerformanceOutSystems Webinar - Troubleshooting Mobile Apps Performance
OutSystems Webinar - Troubleshooting Mobile Apps Performance
 
Training Webinar: Troubleshooting Mobile Apps Performance
Training Webinar: Troubleshooting Mobile Apps Performance Training Webinar: Troubleshooting Mobile Apps Performance
Training Webinar: Troubleshooting Mobile Apps Performance
 
Javascript & SEO 2019
Javascript & SEO 2019Javascript & SEO 2019
Javascript & SEO 2019
 
Responsive Design: Let's get Responsive!
Responsive Design: Let's get Responsive!Responsive Design: Let's get Responsive!
Responsive Design: Let's get Responsive!
 
Burgas Conf 21.06.2014 - Single page application Angularjs and Nodejs
Burgas Conf 21.06.2014 - Single page application Angularjs and NodejsBurgas Conf 21.06.2014 - Single page application Angularjs and Nodejs
Burgas Conf 21.06.2014 - Single page application Angularjs and Nodejs
 
Final presentation aldy ian - pwa
Final presentation   aldy ian - pwaFinal presentation   aldy ian - pwa
Final presentation aldy ian - pwa
 
20190826 ianjoseph_FinalPresentation
20190826 ianjoseph_FinalPresentation20190826 ianjoseph_FinalPresentation
20190826 ianjoseph_FinalPresentation
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
MVP vs MVVM : a fast introduction
MVP vs MVVM : a fast introductionMVP vs MVVM : a fast introduction
MVP vs MVVM : a fast introduction
 
Foster - Getting started with Angular
Foster - Getting started with AngularFoster - Getting started with Angular
Foster - Getting started with Angular
 
Android Training - Sliding Menu
Android Training - Sliding MenuAndroid Training - Sliding Menu
Android Training - Sliding Menu
 
Fountain project model
Fountain project modelFountain project model
Fountain project model
 
[JogjaJS] Single Page Application nganggo Angular.js
[JogjaJS] Single Page Application nganggo Angular.js [JogjaJS] Single Page Application nganggo Angular.js
[JogjaJS] Single Page Application nganggo Angular.js
 
Advanced Techniques for Testing Responsive Apps and Sites -- By Aakrit Prasad
 Advanced Techniques for Testing Responsive Apps and Sites -- By Aakrit Prasad Advanced Techniques for Testing Responsive Apps and Sites -- By Aakrit Prasad
Advanced Techniques for Testing Responsive Apps and Sites -- By Aakrit Prasad
 
Concept Map
Concept MapConcept Map
Concept Map
 
Qt WebKit going Mobile
Qt WebKit going MobileQt WebKit going Mobile
Qt WebKit going Mobile
 
9 Useful Things that Every Web Developer Needs to Know
9 Useful Things that Every Web Developer Needs to Know9 Useful Things that Every Web Developer Needs to Know
9 Useful Things that Every Web Developer Needs to Know
 

Plus de Kan-Han (John) Lu

Working process and git branch strategy
Working process and git branch strategyWorking process and git branch strategy
Working process and git branch strategyKan-Han (John) Lu
 
Deep neural network for youtube recommendations
Deep neural network for youtube recommendationsDeep neural network for youtube recommendations
Deep neural network for youtube recommendationsKan-Han (John) Lu
 
Twitter as a personalizable information service ii
Twitter as a personalizable information service iiTwitter as a personalizable information service ii
Twitter as a personalizable information service iiKan-Han (John) Lu
 
Multimedia data minig and analytics sentiment analysis using social multimedia
Multimedia data minig and analytics sentiment analysis using social multimediaMultimedia data minig and analytics sentiment analysis using social multimedia
Multimedia data minig and analytics sentiment analysis using social multimediaKan-Han (John) Lu
 
ARM: Trusted Zone on Android
ARM: Trusted Zone on AndroidARM: Trusted Zone on Android
ARM: Trusted Zone on AndroidKan-Han (John) Lu
 
Android Training - Pull to Refresh
Android Training - Pull to RefreshAndroid Training - Pull to Refresh
Android Training - Pull to RefreshKan-Han (John) Lu
 
Code analyzer: FindBugs and PMD
Code analyzer: FindBugs and PMDCode analyzer: FindBugs and PMD
Code analyzer: FindBugs and PMDKan-Han (John) Lu
 
Android Training - Content Sharing
Android Training - Content SharingAndroid Training - Content Sharing
Android Training - Content SharingKan-Han (John) Lu
 
Android Training - Action Bar
Android Training - Action BarAndroid Training - Action Bar
Android Training - Action BarKan-Han (John) Lu
 

Plus de Kan-Han (John) Lu (20)

Dagger for android
Dagger for androidDagger for android
Dagger for android
 
Android develop guideline
Android develop guidelineAndroid develop guideline
Android develop guideline
 
Working process and git branch strategy
Working process and git branch strategyWorking process and git branch strategy
Working process and git branch strategy
 
Deep neural network for youtube recommendations
Deep neural network for youtube recommendationsDeep neural network for youtube recommendations
Deep neural network for youtube recommendations
 
Android testing part i
Android testing part iAndroid testing part i
Android testing part i
 
Cuda project paper
Cuda project paperCuda project paper
Cuda project paper
 
Twitter as a personalizable information service ii
Twitter as a personalizable information service iiTwitter as a personalizable information service ii
Twitter as a personalizable information service ii
 
Multimedia data minig and analytics sentiment analysis using social multimedia
Multimedia data minig and analytics sentiment analysis using social multimediaMultimedia data minig and analytics sentiment analysis using social multimedia
Multimedia data minig and analytics sentiment analysis using social multimedia
 
Android IPC: Binder
Android IPC: BinderAndroid IPC: Binder
Android IPC: Binder
 
ARM: Trusted Zone on Android
ARM: Trusted Zone on AndroidARM: Trusted Zone on Android
ARM: Trusted Zone on Android
 
Android Training - Pull to Refresh
Android Training - Pull to RefreshAndroid Training - Pull to Refresh
Android Training - Pull to Refresh
 
Java: Exception Handling
Java: Exception HandlingJava: Exception Handling
Java: Exception Handling
 
Dynamic Proxy by Java
Dynamic Proxy by JavaDynamic Proxy by Java
Dynamic Proxy by Java
 
Code analyzer: FindBugs and PMD
Code analyzer: FindBugs and PMDCode analyzer: FindBugs and PMD
Code analyzer: FindBugs and PMD
 
Android UI System
Android UI SystemAndroid UI System
Android UI System
 
Android Fragment
Android FragmentAndroid Fragment
Android Fragment
 
Android Training - Content Sharing
Android Training - Content SharingAndroid Training - Content Sharing
Android Training - Content Sharing
 
Android Training - Action Bar
Android Training - Action BarAndroid Training - Action Bar
Android Training - Action Bar
 
Explaination of angular
Explaination of angularExplaination of angular
Explaination of angular
 
Computer Vision
Computer VisionComputer Vision
Computer Vision
 

Dernier

Environmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial BiosensorEnvironmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial Biosensorsonawaneprad
 
Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024AyushiRastogi48
 
Dubai Calls Girl Lisa O525547819 Lexi Call Girls In Dubai
Dubai Calls Girl Lisa O525547819 Lexi Call Girls In DubaiDubai Calls Girl Lisa O525547819 Lexi Call Girls In Dubai
Dubai Calls Girl Lisa O525547819 Lexi Call Girls In Dubaikojalkojal131
 
Quarter 4_Grade 8_Digestive System Structure and Functions
Quarter 4_Grade 8_Digestive System Structure and FunctionsQuarter 4_Grade 8_Digestive System Structure and Functions
Quarter 4_Grade 8_Digestive System Structure and FunctionsCharlene Llagas
 
OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024innovationoecd
 
User Guide: Capricorn FLX™ Weather Station
User Guide: Capricorn FLX™ Weather StationUser Guide: Capricorn FLX™ Weather Station
User Guide: Capricorn FLX™ Weather StationColumbia Weather Systems
 
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...D. B. S. College Kanpur
 
Observational constraints on mergers creating magnetism in massive stars
Observational constraints on mergers creating magnetism in massive starsObservational constraints on mergers creating magnetism in massive stars
Observational constraints on mergers creating magnetism in massive starsSérgio Sacani
 
Biological classification of plants with detail
Biological classification of plants with detailBiological classification of plants with detail
Biological classification of plants with detailhaiderbaloch3
 
Pests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdfPests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdfPirithiRaju
 
Introduction of Human Body & Structure of cell.pptx
Introduction of Human Body & Structure of cell.pptxIntroduction of Human Body & Structure of cell.pptx
Introduction of Human Body & Structure of cell.pptxMedical College
 
Topic 9- General Principles of International Law.pptx
Topic 9- General Principles of International Law.pptxTopic 9- General Principles of International Law.pptx
Topic 9- General Principles of International Law.pptxJorenAcuavera1
 
Davis plaque method.pptx recombinant DNA technology
Davis plaque method.pptx recombinant DNA technologyDavis plaque method.pptx recombinant DNA technology
Davis plaque method.pptx recombinant DNA technologycaarthichand2003
 
GenAI talk for Young at Wageningen University & Research (WUR) March 2024
GenAI talk for Young at Wageningen University & Research (WUR) March 2024GenAI talk for Young at Wageningen University & Research (WUR) March 2024
GenAI talk for Young at Wageningen University & Research (WUR) March 2024Jene van der Heide
 
Speech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptxSpeech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptxpriyankatabhane
 
Harmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms PresentationHarmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms Presentationtahreemzahra82
 
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)User Guide: Pulsar™ Weather Station (Columbia Weather Systems)
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)Columbia Weather Systems
 
Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫qfactory1
 
Pests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdfPests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdfPirithiRaju
 

Dernier (20)

Environmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial BiosensorEnvironmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial Biosensor
 
Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024
 
Dubai Calls Girl Lisa O525547819 Lexi Call Girls In Dubai
Dubai Calls Girl Lisa O525547819 Lexi Call Girls In DubaiDubai Calls Girl Lisa O525547819 Lexi Call Girls In Dubai
Dubai Calls Girl Lisa O525547819 Lexi Call Girls In Dubai
 
Quarter 4_Grade 8_Digestive System Structure and Functions
Quarter 4_Grade 8_Digestive System Structure and FunctionsQuarter 4_Grade 8_Digestive System Structure and Functions
Quarter 4_Grade 8_Digestive System Structure and Functions
 
OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024
 
User Guide: Capricorn FLX™ Weather Station
User Guide: Capricorn FLX™ Weather StationUser Guide: Capricorn FLX™ Weather Station
User Guide: Capricorn FLX™ Weather Station
 
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...
 
Observational constraints on mergers creating magnetism in massive stars
Observational constraints on mergers creating magnetism in massive starsObservational constraints on mergers creating magnetism in massive stars
Observational constraints on mergers creating magnetism in massive stars
 
Biological classification of plants with detail
Biological classification of plants with detailBiological classification of plants with detail
Biological classification of plants with detail
 
Pests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdfPests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdf
 
Introduction of Human Body & Structure of cell.pptx
Introduction of Human Body & Structure of cell.pptxIntroduction of Human Body & Structure of cell.pptx
Introduction of Human Body & Structure of cell.pptx
 
Topic 9- General Principles of International Law.pptx
Topic 9- General Principles of International Law.pptxTopic 9- General Principles of International Law.pptx
Topic 9- General Principles of International Law.pptx
 
AZOTOBACTER AS BIOFERILIZER.PPTX
AZOTOBACTER AS BIOFERILIZER.PPTXAZOTOBACTER AS BIOFERILIZER.PPTX
AZOTOBACTER AS BIOFERILIZER.PPTX
 
Davis plaque method.pptx recombinant DNA technology
Davis plaque method.pptx recombinant DNA technologyDavis plaque method.pptx recombinant DNA technology
Davis plaque method.pptx recombinant DNA technology
 
GenAI talk for Young at Wageningen University & Research (WUR) March 2024
GenAI talk for Young at Wageningen University & Research (WUR) March 2024GenAI talk for Young at Wageningen University & Research (WUR) March 2024
GenAI talk for Young at Wageningen University & Research (WUR) March 2024
 
Speech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptxSpeech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptx
 
Harmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms PresentationHarmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms Presentation
 
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)User Guide: Pulsar™ Weather Station (Columbia Weather Systems)
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)
 
Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫
 
Pests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdfPests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdf
 

Android Training - View Pager

  • 2. Outline ● Introduction ● Design ○ PagerIndicator ● How to implement ○ PageTransfomer ● Summary ● Homework
  • 3. Introduction ViewPager is a LayoutManager that allows the user to flip left and right through pages of data.
  • 4. Introduction ViewPager was released as part of the Compatibility Package revision 3 and works with Android 1.6 upwards. ViewPager is a ViewGroup and works in a similar manner to AdapterViews (like ListView and Gallery) so it shouldn’t feel too foreign. ref: http://goo.gl/SgWOUw
  • 6. Design Example: Unlimited swipable page ● ViewPager ● PageAdapter ● PageTransformer
  • 7. Design CircularViewPager ● Two virtual page: Right and Left ● Swipe to virtual page upon to set it back. RIGHTLEFT
  • 8. Design PageAdapter ● Fragment pager adapter ● Instantiate a fragment when showing it.
  • 9. Design PageTransformer ● While it is instantiated, transforming with PageTransformer. ● Depth animation fades the page out, and scales it down linearly.
  • 10. Design - PagerIndicator ViewPager widget it is not always obvious to the user that there are adjacent views they can navigate to. http://viewpagerindicator.com/ Jake Wharton
  • 11. Design Android Design in Action: Common UX Issues Streamed live on Sep 10, 2013 Join Nick Butcher, Adam Koch and Roman Nurik as they discuss various elements of Android Design. This week, we'll run through a top-ten-style list of the most common user experience issues we've observed during app review. Slides can be found here: https://plus. google. com/+RomanNurik/posts/6PwgQPMvK1p Youtube: http://goo.gl/ujyWvy
  • 12. How to implement ● Implement a OnPageChangeListener (Trick) We can’t deal with something here because it calls back meanwhile scrolling. We need to know when does it finish scrolling.
  • 13. How to implement PagerTransformer ● Implement DepthPagerTransformer. ● Override the transfromPage method. ● Transform every child item with position. N - 1 N + 1N Position: -1 0 1
  • 14. How to implement ● scaleFactor: [MIN_SCALE, 1] ● Centre: pageWidth * -position Scale: MIN_SCALE + (1 - MIN_SCALE) * (1 - position) Alpha: 1 - position N - 1 N + 1N Position: -1 0 1
  • 15. Summary ● Where can we apply ViewPager ● How does ViewPager to work ● Transform Pager by using PagerTransformer Demo:
  • 16. Homework Sample source code: (You can also fInd it at the video record nearby if this link is invalid.) https://www.dropbox.com/s/jtrn6iph2htcmyy/TrainingViewPager.zip Basic: ● Vertically swiping view pager Advance: ● Customize a view pager that can parameterlize the velocity, delay time, duration, etc,.