Development Android

Development Android

DEPARTMENT OF COMPUTER GRAPHICS AND INTERACTION Development Android Jan Balata 1 Topics n Material design n Architecture n Development n Accessibility Development Android 2 Android Lollipop n New UI design n New runtime n Enhanced notifications n Increased efficiency Development Android 3 Material Design n Material is the metaphor – The material is grounded in tactile reality – Inspired by the study of paper and ink – The flexibility of the material creates new affordances that supersede those in the physical world n Bold, graphic, intentional – Deliberate color choices, edge-to-edge imagery, large-scale typography, intentional white space n Motion provides meaning – Respects and reinforces the user as the prime mover – Objects are presented to the user without breaking the continuity of experience – They transform and reorganize Development Android 4 What is material? n 3D space n All objects have x, y, and z dimensions n Z-axis is perpendicularly aligned to the plane of the display n Every sheet of material occupies a single position along the z- axis and has a standard 1dp thickness Development Android 5 Material properties Material casts shadows. Material can change shape. Z-axis motion is typically a result of user interaction with material. If you remove a portion of material from a sheet of material, the sheet of material will become a whole sheet again. Development Android 6 Elevation n All material objects have a resting elevation, whether the object is a small component or a sheet that spans the entire display. n Responsive elevation and dynamic elevation offsets Development Android 7 Animation n Accelerate objects swiftly and decelerate them slowly to avoid abrupt changes in velocity. – Motion with swift acceleration and gentle deceleration feels natural and delightful. Development Android 8 Meaningful transitions n It is difficult for a user to know where to look or understand how an element got from point A to point B – Carefully choreographed motion design can effectively guide the user’s attention and focus through multiple steps of a process or procedure Development Android 9 Color n Color is inspired by bold color statements juxtaposed with muted environments – Taking cues from contemporary architecture, road signs, pavement marking tape, and sports courts – Emphasize bold shadows and highlights – Introduce unexpected and vibrant colors Development Android 10 Layout n Designed to scale across different screen sizes n Paper craft – In material design, every pixel drawn by an application resides on a sheet of paper – Paper has a flat background color and can be sized to serve a variety of purposes – Typical layout is composed of multiple sheets of paper Development Android 11 Layout structure n Status bar n App bar n Toolbars n Side nav – Left nav for navigation or identity (Navigation drawer) – Right nav secondary to the main content n Content n Android navigation bar Development Android 12 Buttons n Choose a button style depends on the primacy of the button, the number of containers on screen, and the overall layout of the screen Floating action button Raised button Flat button Development Android 13 Gestures Touch Double touch Drag, Swipe, or Fling Long-press Long-press drag Double-touch drag Pinch open Pinch closed Two-finger touch Two-finger swipe, drag, fling Two-finger long-press Two-finger long-press drag Two-finger double touch Rotate Development Android 14 Navigation I. n Up vs. Back – The Up button is used to navigate within an app based on the hierarchical relationships between screens – The system Back button is used to navigate, in reverse chronological order, through the history of screens the user has recently worked with Development Android 15 Navigation II. n Up vs. Back – The Up button is used to navigate within an app based on the hierarchical relationships between screens – The system Back button is used to navigate, in reverse chronological order, through the history of screens the user has recently worked with Development Android 16 Devices and Display I. n Millions of phones, tablets, and other devices – Wide variety of screen sizes and form factors n Use RelativeLayout – Allows to specify layout in terms of the spacial relationships between components not only linear n Use density-independent pixels (dp) – Base layout dimension unit – Defining dimensions with pixels is a problem because different screens have different pixel densities n Use scale-independent pixels (sp) – Base text size unit – It is scaled by the user's preferred text size Development Android 17 Devices and Display II. n Each device is falling into size bucket and density bucket – ldpi (low) ~120dpi – mdpi (medium) ~160dpi – hdpi (high) ~240dpi – xhdpi (extra-high) ~320dpi – xxhdpi (extra-extra-high) ~480dpi – xxxhdpi (extra-extra-extra-high) ~640dpi n Design layouts for different size buckets n Provide bitmap images for different density buckets Development Android 18 Devices and Display III. n Without support for different densities n With support for different densities Development Android 19 48dp Rhythm n Touchable UI components are generally laid out along 48dp units. – 48dp translate to a physical size of about 9mm (with some variability). • In the range of recommended target sizes (7-10 mm) for touchscreen objects – Users will be able to reliably and accurately target them with their fingers • Your targets will never be smaller than the minimum recommended target size of 7mm regardless of what screen they are displayed on • You strike a good compromise between overall information density on the one hand, and targetability of UI elements on the other n Mind the gaps – Spacing between each UI element is 8dp Development Android 20 Pure Android n Don't mimic UI elements from other platforms n Don't carry over platform-specific icons n Don't use bottom tab bars n Don't hardcode links to other apps n Don't use labeled back buttons on action bars n Don't use right-pointing carets on line items Development Android 21 History n Developed by Android, Inc., bought by Google in 2005, unveiled in 2007 along with founding of Open Handset Alliance – first smartphone HTC Dream, (October 22, 2008) n Free under Apache License n Java libraries based on Apache Harmony Development Android 22 ART Development Android 23 Android Runtime n Core Java Libraries – APIs • Utilities, • File Access, • Network, • Graphics, ... n Dalvik Virtual Machine n Android Runtime (ART) – Ahead-of-time (AOT) compilation performed upon installation – From java bytecode for backward compatibility (.dex) – No compiling on start but more storage for compiled code – Improved performance of garbage collection, debugging, profiling Development Android 24 Libraries & Application Framework n Application Framework – Enable and simplify reuse of components • View System – buttons, text boxes, web browser, ... • Resource Manager – non-code resources: audio, images, ... • Notification Manager – alerts in status bar, … n Libraries (C++) – Available through Application Frameworks • Media Libraries, Audio Manager, 3D Libraries, SQLite, … Development Android 25 Development n IDE – Graphical UI Builders, – Develop on Hardware Devices, – Develop on Virtual Devices, – Powerful Debugging, ... n Language – Apps usually developed in the Java – Parts of app using native-code languages such as C and C++ • Generally does not result in a noticeable performance improvement, but it always increases your app complexity • Signal processing, physics simulation, games ... – Cross-platform tools • Xamarin, PhoneGap, MonoGame, … Development Android 26 Installation n JDK 6 n Android Studio – http://developer.android.com/sdk/installing/studio.html – Based on IntelliJ IDEA – All the Android SDK Tools to design, test, debug, and profile your app – Windows, Mac, Linux Development Android 27 Distribution Versions n Relative number of active devices running a given version of the Android platform Version Codename API Distribution 2.2 Froyo 8 0.4% 2.3.3 - Gingerbread 10 7.4% 2.3.7 4.0.3 - Ice Cream 15 6.4% 4.0.4 Sandwich 4.1.x 16 18.4% 4.2.x Jelly Bean 17 19.8% 4.3 18 6.3% 4.4 KitKat 19 39.7% 5.0 Lollipop 21 1.6% February 2, 2015 Development Android 28 Distribution Screens n Data about the relative number of active devices that have a particular screen configuration – Defined by a combination of screen size and density February 2, 2015 Development Android 29 Application Fundamentals n Multi-user Linux system – Each application is a different user n Each process has its own virtual machine (ATR) – Application's code runs in isolation from other applications n Every application runs in its own Linux process – Android starts the process when any of the application's components need to be executed – Then shuts down the process • When it's no longer needed or • When the system must recover memory for other applications Development Android 30 Application Components n Activities – A single screen with a user interface – Each one is independent of the others • Different application can start any one of these activities n Services – Component that runs in the background to perform long-running operations or to perform work for remote processes – Does not provide a user interface n Content Providers – Manages a shared set of application data – Can store the data in the file system, an SQLite database, on the web, or any other persistent storage location application can access n Broadcast Receivers – Component that responds to system-wide broadcast announcements – Can create a status bar notification to alert the user when

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    53 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us