© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Narciso (nj) Jaramillo Building Multi-Density and Multi-Platform UIs with Flex.

Slides:



Advertisements
Similar presentations
Coding a Responsive HTML
Advertisements

Chapter 3 – Web Design Tables & Page Layout
What is jQuery Mobile? How to use it? Doncho Minkov Telerik Corporation Technical Trainer.
NIAGARA MOBILE Gareth Johnson June, 2012 © Tridium 2012.
CE881: Mobile and Social Application Programming Simon M. Lucas Layouts.
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Honing In on Multiple Targets with a Single Codebase Jeff Tapper Senior Technologist.
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Web & Mobile App Accessibility with Adobe Tools Kiran Kaja | Accessibility.
Mobile App Development on Multiple Platforms Using Titanium Campus Compass Team Student Led Seminar Adam Plisch, Brian Russell, Jonathan LeFeber.
UNIT-e Roadmap Technology Day - November Where were we in 2006?  VB 6 Applications  Database Manager  Managers/Proformas  Office Builder  RG.
One App for All Coding for different iOS variants Mike Oliver iOS Team Lead
Intro to Android For the iOS fan Denver Java Users Group January 11, 2012 Mike Wolfson.
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 12: Building Responsive Webpages.
Getting Started with Adobe Dreamweaver CS6. Unit Objectives Define web design software Start Adobe Dreamweaver CS6 View the Dreamweaver workspace Work.
 jQuery Mobile An Introduction. What is jQuery Mobile  A framework built on top of jQuery, used for creating mobile web applications  Designed to make.
New Rollbase User Interface
CIT 256 Mobile Web Development Dr. Beryl Hoffman.
GAO YUAN We are here for:  We know iPhone from iOS Human Interface Guidelines  The guidelines and principles that help you.
Lesson 15: Mobile Design and Layout Introduction to Adobe Dreamweaver CS6 Adobe Certified Associate: Web Communication using Adobe Dreamweaver CS6.
WDV 331 Dreamweaver Applications Designing Websites for Mobile Devices Dreamweaver CS6 Chapter 11.
© Ms. Masihi.  The Dreamweaver Welcome Screen first opens when you start Dreamweaver.  This screen gives you quick access to previously opened files,
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Adobe Presentation Brijesh Patel | Working with AIR Native Extensions.
| imodules.com Making Your Site Mobile-Ready Presented by Chris Smith and Mark Werner.
Chapter 2 Developing a Web Page. Chapter 2 Lessons Introduction 1.Create head content and set page properties 2.Create, import, and format text 3.Add.
Chapter 2 Developing a Web Page. A web page is composed of two distinct sections: –The head content –The body Creating Head Content and Setting Page Properties.
An Introduction to Silverlight Matt Harrington Developer Evangelist, Microsoft October 20, 2011.
Accessibility Through Responsive Design. Justin Stockton 2
Week 8 – Part 3 More on Links, Layout, and Mobile Key Concepts 1.
Responsive design - Bedrock to our site Responsive site templates included.
Copyright 2012 Adobe Systems Incorporated. All rights reserved. ® Copyright 2010 Adobe Systems Incorporated. All rights reserved. ® Copyright 2012 Adobe.
1 MMDE5012 Interactive Media Practice Seminar 2 Week 2.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
GETTING FROM DESIGN TO IMPLEMENTATION How to get to the finish line with Responsive and Mobile Development.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 7 Key Concepts 1 Copyright © Terry Felke-Morris.
Creating an Example Android App in Android Studio Activity lifecycle & UI Resources.
WaveMaker Visual AJAX Studio 4.0 Training Basics: Building Your First Application Designer Basics.
UI Design and Development +Roman Nurik +Nick Butcher.
Mobile Applications: Unit - I
Chapter 10 Writing and Printing Documents. 2Practical PC 5 th Edition Chapter 10 Getting Started In this Chapter, you will learn: − How word processing.
Responsive Design Design that Adapts to Different Devices SoftUni Team Technical Trainers Software University
2006 Adobe Systems Incorporated. All Rights Reserved. 1 Flex for Flash Developers Sho Kuwamoto Sr. Director, Engineering Adobe Systems, Inc.
Building Apps for BlackBerry PlayBook Terry Ryan Adobe Developer Evangelist
GO MOBILE. GO RESPONSIVE. 185 mil mobile internet users in India
Mobile Devices Lesson 11. Objective: The challenges of designing for mobile devices Using CSS3 media queries Converting a fixed width layout to a single.
Positioning Objects with CSS and Tables
Blaise Senior UX Designer at AllofUs Friend of foxes Android UI The Basics.
© 2012 DigitalDay | Mobile Development March 29,
0 Developing for Windows 10 Tony Champion Champion DS.
© 2012 DigitalDay | MOBILE WEB DESIGN PRINCIPLES Best Practices Workshop 1.
Lesson 1 – Getting Started with App Inventor
ANDROID LAYOUTS AND WIDGETS. Slide 2 Introduction Parts of the Android screen Sizing widgets and fonts Layouts and their characteristics Buttons, checkboxes.
School of Engineering and Information and Communication Technology KIT305/KIT607 Mobile Application Development Android OS –Permissions (cont.), Fragments,
How HTML responsiveness translates to PDF
CHALLENGES IN FRONT OF MOBILE APPLICATIONS DEVELOPMENT
A better approach to mobile
Styling For Print From Screen to Paper
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Basic Introduction to Portal Designer
CS 0134 (term 2181) Jarrett Billingsley
RESPONSIVE WEB DESIGN.
Responsive Design in WordPress
Making Your Site Mobile-Ready
Dismissal Staff Quick Start Guide
Android Layout Basics Topics
Responsive Framework.
Responsive Web Design (RWD)
WEB DESIGN FOR MULTIPLE SCREENS
Various mobile devices
17 RESPONSIVE WEB DESIGN.
Christopher Harrison Jeremy Foster
Presentation transcript:

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Narciso (nj) Jaramillo Building Multi-Density and Multi-Platform UIs with Flex

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Calibrating…  Have a touchscreen smartphone (Android, iOS, other)?  Have a touchscreen tablet (Android, iOS, other)?  Know what a ViewNavigator is?  Used Flash Builder “Burrito”/Flex “Hero” prerelease?  Built a mobile Flex app? 2

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Overview  Challenges in multiscreen development  Designing adaptive UI for multiple mobile screens  Building adaptive UI using Flex 3

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. What I won’t be covering in depth  New mobile app components (ViewNavigator, ActionBar, ViewMenu)  Overall app architecture  Code sharing between mobile and desktop apps  Packaging workflows for multiple platforms 4

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Challenges in multiscreen development

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. What does multiscreen mean? 6 Pixel densitiesForm factors UI and hardware conventions 240 dpi 160/320 dpi

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Leveraging Flex 4.5 for multiscreen mobile UI development 7 Classic Flex features Core Spark components Dynamic layout States and state groups Mobile components and skins App components (ViewNavigator / ActionBar / ViewMenu) Cross-platform component skins Alternative skins for certain platform conventions Per-platform CSS rules DPI managementAutomatic DPI-based application scaling DPI-aware skins Multi-DPI bitmaps Per-DPI CSS rules

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Designing adaptive UI for multiple mobile screens

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Before you design… Know your platforms Platform UI guidelines | Great apps | UI patterns Know your devices Screen resolutions | Pixel densities | Hardware affordances Know your app Core information | Key user tasks | Appropriateness for mobile Know your platforms Platform UI guidelines | Great apps | UI patterns Know your devices Screen resolutions | Pixel densities | Hardware affordances Know your app Core information | Key user tasks | Appropriateness for mobile 9

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. UI patterns: Phones 10

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. UI patterns: Tablets 11

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Example: Floupon – a Groupon browser 12

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Example: Floupon – a Groupon browser  Information  Deals for current location  Info on a specific deal  Discussions for a given deal  User tasks  Refresh the deal list  Buy a deal  Post to a deal discussion 13

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Floupon: Phone version 14

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Floupon: Tablet version (landscape) 15

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Floupon: Tablet version (portrait) 16

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Floupon: Tablet version (portrait) 17

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Floupon: Tablet version (portrait) 18

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Building adaptive UI with Flex: Phone vs. tablet

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Floupon: Separate phone and tablet apps 20 ViewNavigatorApplication List ActionBar ViewNavigator List ActionBar ViewNavigator

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Floupon: Unified phone and tablet app 21 ViewNavigator List ActionBar ViewNavigator List ActionBar ViewNavigator

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Handling the Back key private function initializeHandler(event:Event):void { systemManager.stage.addEventListener(KeyboardEvent.KEY_DOWN, deviceKeyDownHandler); systemManager.stage.addEventListener(KeyboardEvent.KEY_UP, deviceKeyUpHandler); } private function deviceKeyDownHandler(event:KeyboardEvent):void { if (event.keyCode == Keyboard.BACK && mainNavigator.length > 1) event.preventDefault(); } private function deviceKeyUpHandler(event:KeyboardEvent):void { if (event.keyCode == Keyboard.BACK && mainNavigator.length > 1) mainNavigator.popView(); } 22

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Using states to handle layout variations private function resizeHandler(event:ResizeEvent):void { var isPortrait:Boolean = height > width; var isTablet:Boolean = height > 960 || width > 960; currentState = (isPortrait ? "portrait" : "landscape") + (isTablet ? "Tablet" : "Phone"); } 23 <ViewNavigator id="mainNavigator" left="0" left.landscapeTablet="{LIST_WIDTH}" top="0" top.portraitTablet="{ACTIONBAR_HEIGHT + LIST_HEIGHT}" right="0" bottom="0" firstView="views.SummaryView" firstView.landscapeTablet="views.DetailView” firstView.portraitTablet=“views.DetailView” />

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Using state groups 24 <ViewNavigator id="mainNavigator" left="0" left.landscapeTablet="{LIST_WIDTH}" top="0" top.portraitTablet="{ACTIONBAR_HEIGHT + LIST_HEIGHT}" right="0" bottom="0" firstView="views.SummaryView" firstView.tablet="views.DetailView” />

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Managing states in views private function handleViewActivate(): void { setCurrentState(getCurrentViewState()); } override public function getCurrentViewState(): String { var newState: String = getPlatform() + (isTablet() ? "Tablet" : "Phone"); if (hasState(newState)) return newState; else return currentState; } 25

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 26 DEMO: Floupon running on Droid Pro, iPad (portrait/landscape).

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Building adaptive UI with Flex: Density management

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 28 DEMO: App designed for 160 dpi running on Droid 2, iPhone 4 with no autoscaling.

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. CHEAT SHEET: How to deal with density Set applicationDPI=“160” on your application tag Lay out your application for a 160 dpi device Use MultiDPIBitmapSource for all bitmaps Set applicationDPI=“160” on your application tag Lay out your application for a 160 dpi device Use MultiDPIBitmapSource for all bitmaps 29

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Multiple densities: The problem x 40 pixel button Desktop dpi = 1.5” x 0.4” Galaxy dpi = 0.9” x 0.25” Droid dpi = 0.6” x 0.17” iPhone dpi = 0.46” x 0.13” Same pixel count, different physical sizes (Minimum recommended size: 0.25” x 0.25”)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Another perspective ” diagonal screen Same physical size, different pixel counts

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Can I use dynamic layout to solve this? 32 (Not easily. You can make stuff fill the screen using percent sizing, but your fonts and icons will still be tiny. And any fixed pixel sizes, e.g. in constraint-based layouts or padding values, will be wrong.) 640x960 (at same density) 100%

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Solution: Automatic scaling for different DPIs 33 REMEMBER: To your code, the screen is always 160 dpi, and this button is always 160 x 40, regardless of how the application is being scaled. REMEMBER: To your code, the screen is always 160 dpi, and this button is always 160 x 40, regardless of how the application is being scaled. 160 dpi240 dpi320dpi Scaled 1.5xScaled 2x

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Resolution and density 34 Droid Pro 320 x Droid x iPhone x = 320 x 320 x Use scaling (applicationDPI) to deal with density differences Use resizing (dynamic layout) to deal with physical size/aspect ratio differences Use scaling (applicationDPI) to deal with density differences Use resizing (dynamic layout) to deal with physical size/aspect ratio differences 100%

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 35 DEMO: App running on device with proper autoscaling (Droid 2, iPhone 4).

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Scaling different types of objects 36 Vectors scale up well (scaling down can be bad) Outlines may blur slightly Text scales up well (Flash scales font size) Lorem Ipsum Dolor Bitmaps do not scale up well

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 37 DEMO: Refresh button icon without MultiDPIBitmapSource (on desktop).

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Flex density concepts: Multi-DPI bitmaps <MultiDPIBitmapSource 38 Design icon for 160 dpi Make a 1.5x bigger version for 240 dpi Make a 2x bigger version for 320 dpi (e.g. 32x32, 48x48, 64x64) Design icon for 160 dpi Make a 1.5x bigger version for 240 dpi Make a 2x bigger version for 320 dpi (e.g. 32x32, 48x48, 64x64)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 39 DEMO: Refresh button icon with MultiDPIBitmapSource.

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Default mapping for DPI classifications 40 Classificatio n 160 DPI DevicesMost tablets iPhone 3GS Motorola Droid Pro Mapped range < 200 DPI Typical range132 DPI (iPad) to 181 DPI (HTC Hero) Source: Can override default mappings using runtimeDPIProvider 240 DPI Most Android phones >= 200 DPI <= 280 DPI 217 DPI (HTC Evo) to 254 DPI (NexusOne) 320 DPI iPhone 4 > 280 DPI 326 DPI (iPhone 4) Flex groups devices into DPI classifications based on actual device density

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. CHEAT SHEET revisited Set applicationDPI=“160” on your application tag Lay out your application for a 160 dpi device Use MultiDPIBitmapSource for all bitmaps Set applicationDPI=“160” on your application tag Lay out your application for a 160 dpi device Use MultiDPIBitmapSource for all bitmaps 41

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Manual DPI management  Leave applicationDPI unset (will default to same as runtimeDPI)  Built-in component skins in mobile theme will adapt to different DPIs  Your own layouts and skins will need to adapt (pixel and font sizes)  Can to set CSS rules for different DPIs  Use data binding or code to adapt layout properties per DPI  Multi-DPI bitmaps still work 42

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Building adaptive UI with Flex: Multiple platforms

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. UI differences across platforms 44 Android phone iPhone Title left-aligned Title centered No back button On-screen back button Flat-look buttons Beveled buttons Multiple actions Single action

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Per-platform style (os-platform: "ios") { ActionBar { defaultButtonAppearance: "beveled”; titleAlign: "center”; } } 45

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Using states for platform differences 46

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 47 DEMO: App running on iPhone/iPad compared to Droid 2/Galaxy Tab.

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Other common platform differences 48 Android Menu button (use ViewMenu) Longpress menu (use List, SkinnablePopup Container) iOS Bottom toolbar (can use HGroup or SkinnableContainer)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 49 Know your platforms!

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Conclusion

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Key takeaways Design for multiple screens Resolution | Orientation | Density | Platform Use states to handle layout and platform variations Use applicationDPI to handle density Test on desktop or on device Design for multiple screens Resolution | Orientation | Density | Platform Use states to handle layout and platform variations Use applicationDPI to handle density Test on desktop or on device 51

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. What next?  Watch my blog: rictus.com/muchado for slides and code  Follow me on  Look forward to Android support in the May release...  … and iOS and PlayBook support in the June release! 52

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.