Soumettre la recherche
Mettre en ligne
A Deep Dive Into ViewPager
•
3 j'aime
•
2,667 vues
C
CommonsWare
Suivre
from the AnDevCon Boston 2013 conference
Lire moins
Lire la suite
Technologie
Signaler
Partager
Signaler
Partager
1 sur 13
Télécharger maintenant
Télécharger pour lire hors ligne
Recommandé
Android Training - View Pager
Android Training - View Pager
Kan-Han (John) Lu
Android Training - Card Style
Android Training - Card Style
Kan-Han (John) Lu
Joomla v zoom
Joomla v zoom
Webkul Software Pvt. Ltd.
How to Enable PWA for Multi Company in Odoo ?
How to Enable PWA for Multi Company in Odoo ?
Geminate Consultancy Services
Website Project Kanbanview
Website Project Kanbanview
Geminate Consultancy Services
eLearning Local Video
eLearning Local Video
Geminate Consultancy Services
Mobile Web Rock
Mobile Web Rock
Ido Green
JineshPatel_Portfolio
JineshPatel_Portfolio
Jinesh Vinay Patel
Recommandé
Android Training - View Pager
Android Training - View Pager
Kan-Han (John) Lu
Android Training - Card Style
Android Training - Card Style
Kan-Han (John) Lu
Joomla v zoom
Joomla v zoom
Webkul Software Pvt. Ltd.
How to Enable PWA for Multi Company in Odoo ?
How to Enable PWA for Multi Company in Odoo ?
Geminate Consultancy Services
Website Project Kanbanview
Website Project Kanbanview
Geminate Consultancy Services
eLearning Local Video
eLearning Local Video
Geminate Consultancy Services
Mobile Web Rock
Mobile Web Rock
Ido Green
JineshPatel_Portfolio
JineshPatel_Portfolio
Jinesh Vinay Patel
The Action Bar: Front to Back
The Action Bar: Front to Back
CommonsWare
User experience and interactions design
User experience and interactions design
Rakesh Jha
Responsive Web Design - NYC Webgrrls
Responsive Web Design - NYC Webgrrls
Amelie Walker-Yung
Mastering the Master Detail Pattern
Mastering the Master Detail Pattern
CommonsWare
Angular presentation
Angular presentation
Matus Szabo
That's Rich! Putting a smile on ADF Faces (ODTUG Kaleidoscope 2009)
That's Rich! Putting a smile on ADF Faces (ODTUG Kaleidoscope 2009)
Lucas Jellema
Responsive Web Design for Drupal, CMS Expo
Responsive Web Design for Drupal, CMS Expo
Emma Jane Hogbin Westby
From Android to the Mobile Web
From Android to the Mobile Web
CommonsWare
Responsive Web Design
Responsive Web Design
John Mark ジョンマーク
Prototyping + User Journeys
Prototyping + User Journeys
Fitri Farina Mahat
JavaScript Patterns and Principles
JavaScript Patterns and Principles
Aaronius
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
AdobeMarketingCloud
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
AdobeMarketingCloud
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
connectwebex
Google I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and Jetpack
Sunita Singh
Getting Started With Material Design
Getting Started With Material Design
Yasin Yildirim
Html 5 mobile - nitty gritty
Html 5 mobile - nitty gritty
Mario Noble
Hybrid Web Applications
Hybrid Web Applications
James Da Costa
Android Design Support Library
Android Design Support Library
Ibnu Sina Wardy
SF Cordova Meetup
SF Cordova Meetup
Andreas Argelius
Gradle and Your Android Wearable Projects
Gradle and Your Android Wearable Projects
CommonsWare
Getting Android Developers for Your Wearables
Getting Android Developers for Your Wearables
CommonsWare
Contenu connexe
Similaire à A Deep Dive Into ViewPager
The Action Bar: Front to Back
The Action Bar: Front to Back
CommonsWare
User experience and interactions design
User experience and interactions design
Rakesh Jha
Responsive Web Design - NYC Webgrrls
Responsive Web Design - NYC Webgrrls
Amelie Walker-Yung
Mastering the Master Detail Pattern
Mastering the Master Detail Pattern
CommonsWare
Angular presentation
Angular presentation
Matus Szabo
That's Rich! Putting a smile on ADF Faces (ODTUG Kaleidoscope 2009)
That's Rich! Putting a smile on ADF Faces (ODTUG Kaleidoscope 2009)
Lucas Jellema
Responsive Web Design for Drupal, CMS Expo
Responsive Web Design for Drupal, CMS Expo
Emma Jane Hogbin Westby
From Android to the Mobile Web
From Android to the Mobile Web
CommonsWare
Responsive Web Design
Responsive Web Design
John Mark ジョンマーク
Prototyping + User Journeys
Prototyping + User Journeys
Fitri Farina Mahat
JavaScript Patterns and Principles
JavaScript Patterns and Principles
Aaronius
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
AdobeMarketingCloud
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
AdobeMarketingCloud
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
connectwebex
Google I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and Jetpack
Sunita Singh
Getting Started With Material Design
Getting Started With Material Design
Yasin Yildirim
Html 5 mobile - nitty gritty
Html 5 mobile - nitty gritty
Mario Noble
Hybrid Web Applications
Hybrid Web Applications
James Da Costa
Android Design Support Library
Android Design Support Library
Ibnu Sina Wardy
SF Cordova Meetup
SF Cordova Meetup
Andreas Argelius
Similaire à A Deep Dive Into ViewPager
(20)
The Action Bar: Front to Back
The Action Bar: Front to Back
User experience and interactions design
User experience and interactions design
Responsive Web Design - NYC Webgrrls
Responsive Web Design - NYC Webgrrls
Mastering the Master Detail Pattern
Mastering the Master Detail Pattern
Angular presentation
Angular presentation
That's Rich! Putting a smile on ADF Faces (ODTUG Kaleidoscope 2009)
That's Rich! Putting a smile on ADF Faces (ODTUG Kaleidoscope 2009)
Responsive Web Design for Drupal, CMS Expo
Responsive Web Design for Drupal, CMS Expo
From Android to the Mobile Web
From Android to the Mobile Web
Responsive Web Design
Responsive Web Design
Prototyping + User Journeys
Prototyping + User Journeys
JavaScript Patterns and Principles
JavaScript Patterns and Principles
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
Google I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and Jetpack
Getting Started With Material Design
Getting Started With Material Design
Html 5 mobile - nitty gritty
Html 5 mobile - nitty gritty
Hybrid Web Applications
Hybrid Web Applications
Android Design Support Library
Android Design Support Library
SF Cordova Meetup
SF Cordova Meetup
Plus de CommonsWare
Gradle and Your Android Wearable Projects
Gradle and Your Android Wearable Projects
CommonsWare
Getting Android Developers for Your Wearables
Getting Android Developers for Your Wearables
CommonsWare
When Microwatts Are Precious: Battery Tips for Wearable Apps
When Microwatts Are Precious: Battery Tips for Wearable Apps
CommonsWare
Android Security: Defending Your Users
Android Security: Defending Your Users
CommonsWare
Secondary Screen Support Using DisplayManager
Secondary Screen Support Using DisplayManager
CommonsWare
Not Quite As Painful Threading
Not Quite As Painful Threading
CommonsWare
Android Development: The 20,000-Foot View
Android Development: The 20,000-Foot View
CommonsWare
Maps V2... And You!
Maps V2... And You!
CommonsWare
Second-Screen Support in Android 4.2
Second-Screen Support in Android 4.2
CommonsWare
Integrate Android Apps and Web Apps
Integrate Android Apps and Web Apps
CommonsWare
X Means Y
X Means Y
CommonsWare
The Wonderful World of Wearables
The Wonderful World of Wearables
CommonsWare
Securing User Data with SQLCipher
Securing User Data with SQLCipher
CommonsWare
Beaming Data to Devices with NFC
Beaming Data to Devices with NFC
CommonsWare
What's New in Jelly Bean
What's New in Jelly Bean
CommonsWare
Making Money at Mobile: 60 Business Models
Making Money at Mobile: 60 Business Models
CommonsWare
AppsWorld Keynote
AppsWorld Keynote
CommonsWare
App Integration (Revised and Updated)
App Integration (Revised and Updated)
CommonsWare
Rich Text Editing and Beyond
Rich Text Editing and Beyond
CommonsWare
App integration: Strategies and Tactics
App integration: Strategies and Tactics
CommonsWare
Plus de CommonsWare
(20)
Gradle and Your Android Wearable Projects
Gradle and Your Android Wearable Projects
Getting Android Developers for Your Wearables
Getting Android Developers for Your Wearables
When Microwatts Are Precious: Battery Tips for Wearable Apps
When Microwatts Are Precious: Battery Tips for Wearable Apps
Android Security: Defending Your Users
Android Security: Defending Your Users
Secondary Screen Support Using DisplayManager
Secondary Screen Support Using DisplayManager
Not Quite As Painful Threading
Not Quite As Painful Threading
Android Development: The 20,000-Foot View
Android Development: The 20,000-Foot View
Maps V2... And You!
Maps V2... And You!
Second-Screen Support in Android 4.2
Second-Screen Support in Android 4.2
Integrate Android Apps and Web Apps
Integrate Android Apps and Web Apps
X Means Y
X Means Y
The Wonderful World of Wearables
The Wonderful World of Wearables
Securing User Data with SQLCipher
Securing User Data with SQLCipher
Beaming Data to Devices with NFC
Beaming Data to Devices with NFC
What's New in Jelly Bean
What's New in Jelly Bean
Making Money at Mobile: 60 Business Models
Making Money at Mobile: 60 Business Models
AppsWorld Keynote
AppsWorld Keynote
App Integration (Revised and Updated)
App Integration (Revised and Updated)
Rich Text Editing and Beyond
Rich Text Editing and Beyond
App integration: Strategies and Tactics
App integration: Strategies and Tactics
Dernier
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
caitlingebhard1
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
FIDO Alliance
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
Navigating the Large Language Model choices_Ravi Daparthi
Navigating the Large Language Model choices_Ravi Daparthi
RaviKumarDaparthi
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
AnubhavMangla3
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
ScyllaDB
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
johnbeverley2021
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
alexjohnson7307
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
FIDO Alliance
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
ScyllaDB
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Skynet Technologies
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
MarkSteadman7
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
Memoori
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
ScyllaDB
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
FIDO Alliance
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
FIDO Alliance
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard37
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
FIDO Alliance
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
Safe Software
Dernier
(20)
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
Navigating the Large Language Model choices_Ravi Daparthi
Navigating the Large Language Model choices_Ravi Daparthi
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
A Deep Dive Into ViewPager
1.
Copyright © 2013
CommonsWare, LLC A Deep Dive Into ViewPager AnDevCon Boston 2013
2.
Copyright © 2013
CommonsWare, LLC Getting Horizontal ● Classic Android UX – Focused on vertical scrolling in conventional apps ● Now Presenting: Matias Duarte – Hired by Google away from Palm/WebOS – Re-emphasized horizontal swiping as a pattern for moving between peer content
3.
Copyright © 2013
CommonsWare, LLC Enter the Protagonist, Stage Left ● ViewPager: Leading Horizontal Swipe Solution – Ships with Android Support package ● Not a backport! – Works a Bit Like a ListView ● You supply an adapter, which supplies “pages” ● ViewPager shows current page ● User horizontal swipes to move back and forth between pages
4.
Copyright © 2013
CommonsWare, LLC TheViewPager Recipe ● Add a ViewPager to your activity layout ● Create a PagerAdapter – Typical: FragmentPagerAdapter or FragmentStatePagerAdapter – Extend, override getCount() and getItem() ● Attach the PagerAdapter to the ViewPager via setAdapter()
5.
Copyright © 2013
CommonsWare, LLC Where We At? ● Indicators: PagerTitleStrip, PagerTabStrip – Supplied with Android Support package – Add as child ofViewPager – Set android:layout_gravity to be top
6.
Copyright © 2013
CommonsWare, LLC Where We At: Wharton Style ● ViewPagerIndicator – Library of indicators – Add as siblings ofViewPager ● E.g., stacked in vertical LinearLayout – Connect toViewPager in Java code
7.
Copyright © 2013
CommonsWare, LLC ViewPager: Not Perfect ● Cannot Easily Be Used In a Fragment – Nested fragments possible but a bit tricky – Requires Android 4.2 or Android Support package ● MinimumThree Pages Loaded – Make sure your pages are fast to be created – More likely to be trouble since larger than ListView rows or other AdapterView scenarios
8.
Copyright © 2013
CommonsWare, LLC Lights Bar! Camera Bar! Action Bar! ● Fragment Pages and the Action Bar – Standard Fragment/Action Bar Recipe ● setHasOptionsMenu(true) ● onCreateOptionsMenu() ● onOptionsItemSelected() – As pages are swiped, action bar items are added/removed
9.
Copyright © 2013
CommonsWare, LLC It's Scrolling, AllThe Way Down ● Handling Scrollable Page Content – SubclassViewPager – Override canScroll() ● Return true if the designated content could be scrolled, false otherwise ● Touch point and scroll delta supplied, in case you need it (e.g., bezel swiping)
10.
Copyright © 2013
CommonsWare, LLC N-Up Printing (Without the Printing Part) ● Showing Multiple Pages at Once – Implement getPageWidth() on your PagerAdapter ● Returns float indicating amount of pager space to devote to this page (e.g., 0.5f) – May wish to call setOffscreenPageLimit() onViewPager to raise number of cached pages
11.
Copyright © 2013
CommonsWare, LLC Plume: A Column of Smoke ● Pages on Phones, Columns onTablets – Devise proper layouts for the screen sizes – If you have aViewPager, give it the adapter – If you do not have aViewPager: ● Use static fragments, or ● Use the adapter to give you fragments for slots – Limitation: same basic structure in all configurations (cannot deal with change)
12.
Copyright © 2013
CommonsWare, LLC I Can Haz Better Adapter? ● FragmentPagerAdapter and FragmentStatePagerAdapter are nice but not perfect ● Limitations – UsingViewPager in some configurations, but not all – Adding/removing/reordering pages
13.
Copyright © 2013
CommonsWare, LLC Speaker Contact Information Source Code
Télécharger maintenant