Pearson Webcast Series

Slides:



Advertisements
Similar presentations
1 Web Site Design Overview of the Internet Cookie Setton.
Advertisements

Android UserInterfaces Nasrullah Niazi. overView All user interface elements in an Android app are built using View and ViewGroup objects. A View is an.
KompoZer. This is what KompoZer will look like with a blank document open. As you can see, there are a lot of icons for beginning users. But don't be.
User Interface Design using jQuery Mobile CIS 136 Building Mobile Apps 1.
Dawn Pedersen Art Institute. What is Spry? Spry is Dreamweaver’s version of JavaScript libraries. Spry effects alter the look of a page element—or of.
Microsoft Word 2010 Lesson 1: Introduction to Word.
 User Interface - Raeha Sandalwala.  Introduction to UI  Layouts  UI Controls  Menus and ‘Toasts’  Notifications  Other interesting UIs ◦ ListView.
© by Pearson Education, Inc. All Rights Reserved.
By: Jeremy Smith.  Introduction  Droid Draw  Add XML file  Layouts  LinearLayout  RelativeLayout  Objects  Notifications  Toast  Status Bar.
Inventory Throughout this slide show there will be hyperlinks (highlighted in blue) follow the hyperlinks to navigate to the specified Topic or Figure.
Getting an account with WordPress.com Open your web browser ( mozilla firefox, internet explorer, opera, etc.,)
With Alex Conger – President of Webmajik.com FrontPage 2002 Level I (Intro & Training) FrontPage 2002 Level I (Intro & Training)
Creating Android user interfaces using layouts 1Android user interfaces using layouts.
Using Technology in Training November 24, 2006 Overview Today’s session will focus on using PowerPoint to develop training materials.
CS5103 Software Engineering Lecture 08 Android Development II.
Microsoft Wang Li, Wang Yini, Li YIcheng.  This is a presentation about Microsoft Windows7 guidelines  Wang Li K8wali00  Li Yicheng K8liyi00  Wang.
Chapter 9: Customize! Navigating with Tabs on a Tablet App.
© Ms. Masihi.  The Dreamweaver Welcome Screen first opens when you start Dreamweaver.  This screen gives you quick access to previously opened files,
HTML, XHTML, and CSS Chapter 12 Creating and Using XML Documents.
Favorite Twitter® Searches App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 4 1 Microsoft Office FrontPage 2003 Tutorial 4 – Using Shared Borders and Themes.
Chapter 5 Creating User Interfaces GOALS and OBJECTIVES Begin our application by creating our user interface. More than one way to create a user interface.
IE 411/511: Visual Programming for Industrial Applications
Basic Android Tutorial USF’s Association for Computing Machinery.
MagicInfo Pro Scheduler Now that a template has been created from content imported into the Library, the user is ready to begin scheduling content to.
SWE205 Review Spring Why is software unusable? Users are no longer trained. Why? Feature creep Inherently hard: a problem of communication Designed.
Create Navigation Drawer Team 2 Zhong Wang Jiaming Dong Philip Wu Lingduo Kong.
CREATING TEMPLATES CREATING CUSTOM CHARACTERS IMPORTING BATCH DATA SAVING DATA & TEMPLATES CREATING SERIES DATA PRINTING THE DATA.
Object Oriented Software Development 9. Creating Graphical User Interfaces.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files.
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. word 2010 Chapter 3 Formatting Documents.
Microsoft Office 2008 for Mac – Illustrated Unit C: Understanding File Management.
USING WORDPRESS TO CREATE A WEBSITE (RATHER THAN A BLOG) STEP-BY-STEP INSTRUCTIONS.
User Interface Components Lecture # 5 From: interface-elements.html.
MIMOS Berhad. All Rights Reserved. Nazarudin Wijee Mohd Sidek Salleh Grid Computing Lab MIMOS Berhad P-GRADE Portal Heuristic Evaluation.
User Interface Design using jQuery Mobile CIS 136 Building Mobile Apps 1.
HW#9 Clues CSCI 571 Fall, HW#9 Prototype
Chapter 5 Introduction To Form Builder. Lesson A Objectives  Display Forms Builder forms in a Web browser  Use a data block form to view, insert, update,
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
CS378 - Mobile Computing More UI - Part 2. Special Menus Two special application menus – options menu – context menu Options menu replaced by action bar.
1 Android Development Lean and mean introduction Based on a presentation by Mihail L. Sichitiu.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files 8/10/ :35 PM.
Web Site Development - Process of planning and creating a website.
CS378 - Mobile Computing User Interface Basics. User Interface Elements View – Control – ViewGroup Layout Widget (Compound Control) Many pre built Views.
Building User Interfaces Basic Applications
Intoduction to Andriod studio Environment With a hello world program.
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
Cosc 4735 Collapsing Toolbar Support Pallette. Collapsing toolbar. Using a ScrollingView like listview, Recyclerview, or a NestedScrollView – Mostly done.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Header, Footer, and Navigation toolbars CIS 136 Building Mobile Apps 1.
CHAPTER 4 Fragments ActionBar Menus. Explore how to build applications that use an ActionBar and Fragments Understand the Fragment lifecycle Learn to.
ANDROID LAYOUTS AND WIDGETS. Slide 2 Introduction Parts of the Android screen Sizing widgets and fonts Layouts and their characteristics Buttons, checkboxes.
Cosc 5/4730 Support design library. Support Design library Adds (API 9+) back support to a number of 5.0 lollipop widgets and material design pieces –
CHAPTER 1 & 2 – MICROSOFT WORD Sravanthi Lakkimsetty April 11, 2016.
UI Redux, Navigation Patterns, Tabbed Views, Pagers, Drawers
Menus. Menus are a common user interface component in many types of applications. The options menu is the primary collection of menu items for an activity.
Dive Into® Visual Basic 2010 Express
Mobile Application Development with MeeGo™ - Touch Apps & UI Design
Chapter 2 Starting a Project
User Interface Components
Mobile Application Development Chapter 4 [Android Navigation and Interface Design] IT448-Fall 2017 IT448- Fall2017.
Politeknik Elektronika Negeri Surabaya
Review 2: Material Design and key widgets.
Chapter 2 – Introduction to the Visual Studio .NET IDE
Android Support Libraries A brief explanation.
Android Developer Fundamentals V2
Android Developer Fundamentals V2 Lesson 4
Presentation transcript:

Pearson Webcast Series

How to Use the Android Design Support Library Webcast Presented by Ian G. Clifton Brought to you by InformIT – informit.com/webcasts

Welcome. Our Agenda Today. Material Design and the Android Design Support Library The Little Pieces: Float Labels, FABs, and Snackbars The Big Pieces: Tabs, Navigation Drawers, Coordinated Animation, and Collapsing Toolbars Q&A Wrap-up & Resources

Material Design Material Design – A design language for beautiful apps Wow, this is amazing! Oh no, how do I implement these things? Come on, the FAB isn’t that hard… What about the changes to tabs and the nav drawer? …not to mention animated app bars and snackbars

The Android Design Support Library Material Design components for Android 2.1 and newer Float labels – TextInputLayout FABs – FloatingActionButton Snackbars - Snackbar Tabs – TabLayout Navigation drawers – NavigationView Coordinated animation – CoordinatorLayout Collapsing toolbars – CollapsingToolbarLayout

Add to Your App Include as a Gradle dependency: dependencies { compile ‘com.android.support.design:23.1.0’ } Or just add any activity that uses the design library within Android Studio

The Little Pieces Float Labels, Floating Action Buttons, and Snackbars

Float Label Input method that shows form labels as hints. Saves space Avoids duplicating text

Float Label Input method that shows form labels as hints. Saves space Avoids duplicating text Hints turn into labels on focus

Float Label Input method that shows form labels as hints. Saves space Avoids duplicating text Hints turn into labels on focus Supports errors and character counting

Float Label Layout Simply wrap an EditText Include an ID for both views That’s it!

Float Label Usage Changes to the hint/label should go through setHint on the TextInputLayout Supports errors with setErrorEnabled and setError Supports counting characters with setCounterEnabled and setCounterMaxLength Convenient getEditText method

FAB Used to call out the core action for a given screen Iconic element of Material Design, but it isn’t required Generally used at this size (56x56dp), but can be used with the “mini” size (40x40dp)

FAB Layout Simple view, often anchored.

FAB Usage Use the fabSize attribute with normal or mini, depending on your needs Child class of ImageButton, which is a child class of ImageView, so you can use methods from those classes such as setImageDrawable Can be shown/hidden with the show and hide methods Uses an OnClickListener like a typical view

Snackbar It’s like a toast but actually good Used to show a short message Tied to your layout Can be dismissed by the user Can optionally be interactive (actions show as colored text) Great for the undo pattern

Snackbar Usage Call the static make method to create a new instance The passed view is used to traverse the hierarchy Set an action if applicable Set a callback to be notified of the snackbar being shown or dismissed Don’t forget to call show when it is ready

The Big Pieces Tabs, Navigation Drawers, Coordinated Animation, and Collapsing Toolbars

Tabs Displayed with the TabLayout class Can be fixed for two or three tabs Or scrollable for more tabs Typically tied to a ViewPager displaying fragments

Tab Layout Typically goes below the Toolbar This can be in a LinearLayout, an AppBarLayout, or wherever makes sense in your app Tab content is almost always implemented with a ViewPager

Tab Usage Create an adapter for ViewPager Don’t forget to override getPageTitle to return the CharSequence for each tab Set the adapter on the ViewPager Call setTabsFromPagerAdapter Call addOnPageChangeListener passing in a new TabLayoutOnPageChangeListener Call setOnTabSelectedListener

Nav Drawer Displayed with the NavigationView class Uses a DrawerLayout as the top-level view Should always be in front of the app but behind the status bar Contains a header plus menu items, optionally split with sections Don’t use one just because you can

Nav Drawer XML Navigation drawer content is defined as a menu in an XML file Primary nav sections are in a group with checkableBehavior set to single Actions are in a separate item with a submenu Generally, every item in a group should have icons or not have icons (be consistent)

Nav Drawer Usage Uses the same “plumbing” as the older style navigation drawer with a DrawerLayout and an ActionBarDrawerToggle Don’t forget to set the OnNavigationItemSelectedListener Override onBackPressed in order to close the drawer if it is open

Nav Drawer Selection Usually the Activity implements the OnNavigationItemSelected interface Selection is handled just like with any MenuItem: get the ID and compare it to values you care about Close the drawer after handling the selection

Coordinated Animation CoordinatorLayout is basically just a FrameLayout …but awesome! Allows view changes such as appearing or scrolling to affect other views For example, a FAB can move out of the way when a snackbar appears Or a toolbar can scroll off the screen while scrolling down another view and pop back on when scrolling up

With AppBarLayout The CoordinatorLayout is usually the root view You will have some kind of view that scrolls (ScrollView, NestedScrollView, RecyclerView, ListView, etc.) You will have an AppBarLayout that contains a Toolbar and possibly a TabLayout You just set the behavior and the scroll flags

Behaviors and Scroll Flags Layout behavior points to the class that implements the behavior Scroll flags will be the combination that makes sense for your app scroll: View scrolls off the screen exitUntilCollapsed: Shrinks to minHeight before scrolling off enterAlways: Scroll back up causes the view to reappear enterAlwaysCollapsed: Scroll back up causes the view to reappear at minHeight

Collapsing Toolbars Toolbar starts at a larger size but shrinks (collapses) as the user scrolls

Collapsing Toolbars Toolbar starts at a larger size but shrinks (collapses) as the user scrolls

Collapsing Toolbars Toolbar starts at a larger size but shrinks (collapses) as the user scrolls

Collapsing Toolbar Usage Extremely easy to implement! Just wrap your Toolbar with a CollapsingToolbarLayout Call setTitle on the CollapsingToolbarLayout You can set the collapse mode to pin or parallax If you use parallax, you can also set layout_collapseParallaxMultiplier and/or contentScrim

Additional Thoughts The support libraries are always being updated CoordinatorLayout behaviors are really cool Browse the source code: https://github.com/android/platform_frameworks_support

Additional Resources Ian G. Clifton Twitter: @iangclifton GitHub: https://github.com/IanGClifton Google Plus: https://plus.google.com/+IanClifton/ Visit informit.com/webcasts for upcoming and archived webcasts.

Thank you! Sign-up for more webcasts at informit.com/webcasts Connect with InformIT at informit.com/community