Android Development Community. Let s do Material Design

Similar documents
Open Lecture Mobile Programming. Intro to Material Design

05. RecyclerView and Styles

Android Navigation Drawer for Sliding Menu / Sidebar

MATERIAL DESIGN. Android Elective Course 4th Semester. June 2016 Teacher: Anders Kristian Børjesson. Ovidiu Floca

Action Bar. Action bar: Top navigation bar at each screen The action bar is split into four different functional areas that apply to most apps.

Java Training Center - Android Application Development

Chapter 8 Positioning with Layouts

AND-401 Android Certification. The exam is excluded, but we cover and support you in full if you want to sit for the international exam.

Overview. What are layouts Creating and using layouts Common layouts and examples Layout parameters Types of views Event listeners

Android CardView Tutorial

Mobile and Ubiquitous Computing: Android Programming (part 3)

Spring Lecture 7 Lecturer: Omid Jafarinezhad

MS_40541 Build Native Cross-Platform Mobile Apps with a Shared C# Business Logic for ios, Android, and UWP in C#.NET with Xamarin and Visual Studio

Styles, Themes, and Material Design

Programming with Android: Introduction. Layouts. Luca Bedogni. Dipartimento di Informatica: Scienza e Ingegneria Università di Bologna

ANDROID USER INTERFACE

INTRODUCTION À LA PLATEFORME ANDROID

Adapter.

Mobile Computing Fragments

Teaching materials and advanced sample applications for Android platform

Android App Development. Mr. Michaud ICE Programs Georgia Institute of Technology

textview("layouts DSL is the only way") { textsize = 45f font = Fonts.MENLO }.lparams { gravity = Gravity.CENTER }

Chapter 5 Flashing Neon FrameLayout

ListView Containers. Resources. Creating a ListView

ANDROID DEVELOPMENT. Course Details

Let s take a display of HTC Desire smartphone as an example. Screen size = 3.7 inches, resolution = 800x480 pixels.

Hello World. Lesson 1. Android Developer Fundamentals. Android Developer Fundamentals. Layouts, and. NonCommercial

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar

Style, Themes, and Introduction to Material Design

An Introduction to Google Blogger

Graphical User Interfaces

Mobile Application Development Android

Upon completion of the second part of the lab the students will have:

ARCHETYPE MODERN ANDROID ARCHITECTURE STEPAN GONCHAROV / DENIS NEKLIUDOV

getcount getitem getitemid getview com.taxi Class MainActivity drawerlayout drawerleft drawerright...

Creating a Custom ListView

Topics of Discussion

Intune post-enrolment FAQs for Android. Contents. How to move icons out of Workspace

User Guide. Version January 11, Copyright 2018 Topaz Systems Inc. All rights reserved.

WEB CREATOR PAGES MANAGER

Intents. Your first app assignment

Bootcamp Curriculum. Mobile Application Development - 7 Weeks. Training Curriculum. Mobile Application Development Curriculum 1. Cross Platform Design

Agenda. Overview of Xamarin and Xamarin.Android Xamarin.Android fundamentals Creating a detail screen

Mobile Programming Lecture 5. Composite Views, Activities, Intents and Filters

Lifespan Guide for installing and using Citrix Receiver on your Mobile Device

CS371m - Mobile Computing. More UI Action Bar, Navigation, and Fragments

Produced by. Mobile Application Development. Eamonn de Leastar

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology

Material Design. +Ran Nachmany

ActionBar. import android.support.v7.app.actionbaractivity; public class MyAppBarActivity extends ActionBarActivity { }

Android Application Development

CS371m - Mobile Computing. More UI Navigation, Fragments, and App / Action Bars

ibooks Author Getting Started

When programming in groups of people, it s essential to version the code. One of the most popular versioning tools is git. Some benefits of git are:

CHAPTER 4. Fragments ActionBar Menus

This FAQ assumes that you that you have successfully enrolled with Intune Company Portal.

PM INDIA OFFICIAL ICON

Android App Development for Beginners

Android UI: Overview

ACTIVITY, FRAGMENT, NAVIGATION. Roberto Beraldi

South Africa

ICS Tutorials: Basic Operations

SD Module-1 Android Dvelopment

Android Basics. Android UI Architecture. Android UI 1

Action Bar. (c) 2010 Haim Michael. All Rights Reserv ed.

Integrating Sintelix and ANB. Learn how to access and explore Sintelix networks in IBM i2 Analyst s Notebook

Text Properties Data Validation Styles/Themes Material Design

CS371m - Mobile Computing. User Interface Basics

CHRIST THE KING BOYS MATRIC HR. SEC. SCHOOL, KUMBAKONAM CHAPTER 2 TEXT FORMATTING

Produced by. Mobile Application Development. Eamonn de Leastar David Drohan

How to Export a Report in Cognos Analytics

Mobile Computing Practice # 2c Android Applications - Interface

OPTIMIZING ANDROID UI PRO TIPS FOR CREATING SMOOTH AND RESPONSIVE APPS

MotionEvents Touch Handling Gestures

Changing Button Images in Microsoft Office

Using Educreations for interactive teaching on ipad

Programming with Android: Introduction. Layouts. Dipartimento di Informatica: Scienza e Ingegneria Università di Bologna

COSMOline. User Documentation

Lacon Childe School. Accessing Parental Online Reports Parent Guidelines

Mobile Software Development for Android - I397

[Type text] Windows Quick Start Guide Version 3.5

Table Visualizer (TV)

Big Tobacco: Tiny Targets Web Application Guide

How to use the Acrobat interface and basic navigation

Quick Start Guide. Microsoft PowerPoint 2013 looks different from previous versions, so we created this guide to help you minimize the learning curve.

Android development. Outline. Android Studio. Setting up Android Studio. 1. Set up Android Studio. Tiberiu Vilcu. 2.

WAIPA DISTRICT COUNCIL. Maps Online 9. Updated January This document contains an overview of IntraMaps/Maps Online version 9.

Excel: Introduction. Microsoft Office 2007.XLSX

Produced by. Mobile Application Development. Eamonn de Leastar

CS378 -Mobile Computing. More UI -Part 2

Creating Effective School and PTA Websites. Sam Farnsworth Utah PTA Technology Specialist

How to Use Internet Explorer 9

Mobile Computing Practice # 2a Android Applications - Interface

USER GUIDE: CHAPTER 1 PROJECT WIZARD Layout Page

CS 4518 Mobile and Ubiquitous Computing Lecture 2: Introduction to Android Programming. Emmanuel Agu

XML Tutorial. NOTE: This course is for basic concepts of XML in line with our existing Android Studio project.

UI Fragment.

Mumbai Android Bootcamp -Course Content

Creating Presentations using MS Power Point

Introduction to Mobile Application Development Using Android Week Three Video Lectures

Transcription:

Let s do Material Design

Agenda Introduction to Material Design Toolbar Navigation Drawer SwipeRefreshLayout RecyclerView Floating Action Button CardView

Toolbar - Lives in package android.support.v7.widget - Found in Support library v7 - It s a generalization of action bars for use within application layouts - Toolbar supports a more focused feature set than ActionBar

Styling our Toolbar - theme.xml or style.xml <style name="apptheme" parent="theme.appcompat.light.noactionbar"> <item name="colorprimary">@color/myprimarycolor</item> <item name="colorprimarydark">@color/myprimarydarkcolor</item> <item name="coloraccent">@color/myaccentcolor</item> <item name="drawerarrowstyle">@style/drawerarrowstyle</item> <item name="android:windowdrawssystembarbackgrounds">true</item> <item name="android:statusbarcolor">@android:color/transparent</item> <item name="android:windowbackground">@color/mywindowbackground</item> <item name="android:windowcontenttransitions">true</item> </style>

Styling our Toolbar - theme.xml or style.xml <style name="drawerarrowstyle" parent="widget.appcompat.drawerarrowtoggle"> <item name="spinbars">true</item> <item name="color">@android:color/white</item> </style> <style name="toolbarstyle" parent=""> <item name="android:elevation">@dimen/toolbar_elevation</item> <item name="popuptheme">@style/themeoverlay.appcompat.light</item> <item name="theme">@style/themeoverlay.appcompat.dark.actionbar</item> </style>

toolbar.xml <android.support.v7.widget.toolbar xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?attr/colorprimarydark" style="@style/toolbarstyle"/> Setup in code ///Gets {@see Toolbar} instance from inflated layout toolbar = (Toolbar) findviewbyid(r.id.toolbar); //Sets our Toolbar instance as our application's ActionBar setsupportactionbar(toolbar); //Enables Home as Up - Arrow or Drawer icon getsupportactionbar().setdisplayhomeasupenabled(true);

Navigation Drawer - It s a layout that looks like a drawer - It contains all the possible main navigation entry points - It s mainly used to the left of the screen - It can have any quantity of items, having a vertical scroller - Items often use an icon, name and a count - Drawer can contain different layout items and/or dividers - It s connected to the Toolbar

Navigation Drawer Implementation - RecyclerView version //The drawer layout private DrawerLayout drawerlayout; //A {@see RecyclerView} which will contain the drawer items private RecyclerView drawerlist; // A {@see RecyclerAdapter} for the RecyclerView private RecyclerAdapter draweradapter; //The RecyclerAdapter callback private RecyclerAdapter.RecyclerAdapterCallback drawercallback; /** This class provides a handy way to tie together the functionality of * {@see android.support.v4.widget.drawerlayout} and {@see Toolbar} to implement the recommended design for navigation drawers. */ private ActionBarDrawerToggle actionbardrawertoggle;

RecyclerView - A flexible view for providing a limited window into a large data set. - Recycles its views which makes a big performance improvement - Uses a layout manager to tell how its items should be aligned - Requires an Adapter like ListView - Better scrolling support - Uses the pattern viewholder internally - Let s see some code!

SwipeRefreshLayout - Lives in package android.support.v4.widget - Found in Support library v4 and v7 - Should be used whenever the user can refresh the contents of a view via a vertical swipe gesture - Should fetch latest updates from server - It only accepts one child layout - Provides multiple methods for customization

SwipeRefreshLayout //Gets {@see SwipeRefreshLayout} instance from inflated layout swiperefreshlayout = ( SwipeRefreshLayout )findviewbyid( R.id.swipeRefreshLayout ); //Sets the spinning view colours from color resource ids swiperefreshlayout.setcolorschemeresources(r.color.dark_green, R.color.light_green, R.color.dark_green, R. color.light_green); //Set spinning view background color from resource id swiperefreshlayout.setprogressbackgroundcolorschemeresource(r.color.light_white); //Sets the {@see SwipeRefreshLayout.OnRefreshListener} to our SwipeRefreshLayout instance swiperefreshlayout.setonrefreshlistener(this);

Floating Action Button - Used to distinguish main actions - At Google I/O they said that now is bundled with support library version 22.2.0 - Plenty of implementations all across the web https://github.com/futuresimple/android-floating-action-button https://github.com/makovkastar/floatingactionbutton - Max quantity within a screen is 6 - Let s see Material Design spec

Floating Action Button - Basic implementation <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent"> <FrameLayout android:id="@+id/view_container" android:layout_width="match_parent" android:layout_height="match_parent"/> <ImageButton android:id="@+id/floatingactionbutton" android:layout_gravity="bottom end" style="@style/fabeditstyle" android:scaletype="fitxy"/> </FrameLayout>

Floating Action Button - Basic implementation <style name="fabeditstyle"> <item name="android:layout_width">56dp</item> <item name="android:layout_height">56dp</item> <item name="android:layout_margin">@dimen/spacing_large</item> <item name="android:padding">@dimen/spacing_large</item> <item name="android:background">@drawable/fab_background</item> <item name="android:src">@drawable/ic_action_edit</item> <item name="android:outlineprovider">background</item> <item name="android:statelistanimator">@anim/fab_elevation</item> </style>

CardView - Let s see the spec http://www.google.com/design/spec/components/cards.html#

Resources Your project should have the following libraries in order to use the discussed components: compile 'com.android.support:appcompat-v7:22.+' compile 'com.android.support:recyclerview-v7:22.+' compile 'com.android.support:cardview-v7:22.+' You can download and/or fork the sample code from: https://github.com/proverbface/materialdesign

Questions? Juan Pablo Proverbio proverbio8@gmail.com