Infinum android talks #12 - Google IO report: Milkshakes, Marshmallows and Marble Cakes

Infinum
InfinumInfinum
We design and develop great
software for mobile and web.
Google I/O 2015 report:
Milkshakes,
Marshmallows and
Marblecakes
M
Permissions:
• Requested on first use of a feature
• Users can control individual permissions on a per
app basis
• Won’t influence legacy apps (unless compiled
against M)
• Developers will have to handle more and more
cases
Fingerprint API:
• Allows users to authenticate actions
• Simple usage with Authentication Callback
• Device credentials can be used

to authenticate, creating a more fluid UX
• Samples:

https://github.com/googlesamples/android-
ConfirmCredential



https://github.com/googlesamples/android-
FingerprintDialog
App links:
• Open twitter using twitter, open Facebook using Facebook
• Managed via both backend and app
Android Pay:
• NFC based payment system
• Any NFC enabled phone can use it
• Fingerprint authentication if supported by device
Doze, Now on Tap, Custom Chrome Tabs
Tools
Android studio:
• Full NDK support
• Vector drawables - generated from SVGs by build
system
• New theme editor and new design editor (in 1.5)
• Play services integration, new SDK manager
• Improved profiling tools
Gradle 2.4 and plugin 1.+:
• Performance increase
• Incremental builds and caching
• Jack The Compiler - Java -> Dex
• Better variant/flavour management
Design support library
Navigation view:
<android.support.design.widget.NavigationView 

android:id="@+id/nav_view"
android:layout_height="match_parent" 

android:layout_width="wrap_content" 

android:layout_gravity="start" 

android:fitsSystemWindows="true" 

app:headerLayout="@layout/nav_header"
app:menu="@menu/drawer_view"/> 



<menu xmlns:android="http://schemas.android.com/apk/res/android"> 



<group android:checkableBehavior="single"> 

<item 

android:id="@+id/nav_home" 

android:icon="@drawable/ic_dashboard" 

android:title="Home" /> 



Design support library
• Uses colorAccent
• Size can be fabSize=“mini"
• Drawable set using src
• Has to have borderWidth set
if you want it to be round :)
Floating Action Button
Design support library
• Anchor and anchor gravity
• ScrollFlags - Behaviour of items on scroll
• Scroll interpolators and content scrims
• Behaviors - Defining user interactions with the view
CoordinatorLayout
Design support library
• Toast-like view for quick feedback with an action
Snackbar
• Edit texts with labels floating above them. Much wow.
Floating labels
• Tabbed layout that can be both fixed and scrollable. Can be
setUpWithViewpager();
Tab layout
• Work together to create nice looking collapsable toolbars
• Can use parallax and parallax multipliers
• Still buggy
AppBar layout and CollapsingToolbar
Data binding
• “Butterknife killer"
• Currently in Beta, coming as a part of AS 1.3
• Write model bindings and simple view logic in layout
XML file
• Views can be even more passive > Cleaner code
Data binding<layout xmlns:android="http://schemas.android.com/apk/res/android"> 

<data> 

<variable name="cheesy" type=“com.support.android.designlibdemo.Cheese"/> 

</data> 

<android.support.design.widget.CoordinatorLayout 
 POJO Model
Parent layout
<TextView
android:layout_width=“match_parent" 

android:layout_height=“wrap_content" 

android:text="@{cheesy.text}" /> 

public class Cheese { 

public final String name; 

public final String text; 

public Cheese(String name, String text) {

this.name = name; 

this.text = text; 

} 

//Replaces setContentView(R.layout.activity_detail); with dynamically generated binding 

binding = DataBindingUtil.setContentView(this, R.layout.activity_detail); 



Cheese cheesy = new Cheese(cheeseName, getString(R.string.cheese_ipsum)); 

//We bind our POJO to it 

binding.setCheesy(cheesy); 

//We can access views without using findViewById 

binding.fab.setOnClickListener(new View.OnClickListener() { 

@Override 

public void onClick(View view) { 

//Change the model 

binding.setCheesy(new Cheese("Got", "Cheddar")); 



} 

});


Activity:
Data binding:
• Most of Java expressions and operators are allowed
• Missing super, this, new
• Automatic null check
• Observables can be used to automatically update UI
on data change
• BaseObservable and @Bindable annotations
Samples:
• https://github.com/googlesamples/
• https://github.com/chrisbanes/cheesesquare
Thank you!
email: ian.rumac@infinum.hr
twitter: @IanIsSoAwesome
1 of 18

More Related Content

What's hot(20)

Top web development toolsTop web development tools
Top web development tools
BusinessDevelopment35251 views
The A1 "AngularJS 1 Kick Start"The A1 "AngularJS 1 Kick Start"
The A1 "AngularJS 1 Kick Start"
Christian John Felix295 views
Building Cool apps with flexBuilding Cool apps with flex
Building Cool apps with flex
Joseph Khan428 views
VaadinVaadin
Vaadin
Francisco Humberto1.4K views
Meteor Introduction - AshishMeteor Introduction - Ashish
Meteor Introduction - Ashish
Entrepreneur / Startup363 views
Home management WebApp presentationHome management WebApp presentation
Home management WebApp presentation
bhavesh singh43 views
Event sourcing your React-Flux applicationsEvent sourcing your React-Flux applications
Event sourcing your React-Flux applications
Maurice De Beijer [MVP]932 views
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
Yatendrasinh Joddha202 views
Developing ASP.NET MVC Applications Quicker With Kendo UIDeveloping ASP.NET MVC Applications Quicker With Kendo UI
Developing ASP.NET MVC Applications Quicker With Kendo UI
Lohith Goudagere Nagaraj11.4K views
Creating MVC Application with backbone jsCreating MVC Application with backbone js
Creating MVC Application with backbone js
Mindfire Solutions1.6K views
2018-10-17 J1 7A - Microsoft Flow advanced - Serge Luca2018-10-17 J1 7A - Microsoft Flow advanced - Serge Luca
2018-10-17 J1 7A - Microsoft Flow advanced - Serge Luca
Modern Workplace Conference Paris75 views
Single page applications & SharePointSingle page applications & SharePoint
Single page applications & SharePoint
Fabio Franzini2.4K views
Togu CMSTogu CMS
Togu CMS
Alessandro Siragusa4K views
HTML5 Charting in ASP.NET using RadHtmlChartHTML5 Charting in ASP.NET using RadHtmlChart
HTML5 Charting in ASP.NET using RadHtmlChart
Lohith Goudagere Nagaraj4.2K views

Similar to Infinum android talks #12 - Google IO report: Milkshakes, Marshmallows and Marble Cakes

AppNotch EnterpriseAppNotch Enterprise
AppNotch Enterpriseappnotch
380 views18 slides
AppNotch 2.0AppNotch 2.0
AppNotch 2.0appnotch
349 views14 slides
KATHY ZHANG_3KATHY ZHANG_3
KATHY ZHANG_3kathy Zhang
153 views6 slides

Similar to Infinum android talks #12 - Google IO report: Milkshakes, Marshmallows and Marble Cakes(20)

More from Infinum(20)

Infinum android talks #12 - Google IO report: Milkshakes, Marshmallows and Marble Cakes

  • 1. We design and develop great software for mobile and web.
  • 2. Google I/O 2015 report: Milkshakes, Marshmallows and Marblecakes
  • 3. M
  • 4. Permissions: • Requested on first use of a feature • Users can control individual permissions on a per app basis • Won’t influence legacy apps (unless compiled against M) • Developers will have to handle more and more cases
  • 5. Fingerprint API: • Allows users to authenticate actions • Simple usage with Authentication Callback • Device credentials can be used
 to authenticate, creating a more fluid UX • Samples:
 https://github.com/googlesamples/android- ConfirmCredential
 
 https://github.com/googlesamples/android- FingerprintDialog
  • 6. App links: • Open twitter using twitter, open Facebook using Facebook • Managed via both backend and app Android Pay: • NFC based payment system • Any NFC enabled phone can use it • Fingerprint authentication if supported by device Doze, Now on Tap, Custom Chrome Tabs
  • 8. Android studio: • Full NDK support • Vector drawables - generated from SVGs by build system • New theme editor and new design editor (in 1.5) • Play services integration, new SDK manager • Improved profiling tools
  • 9. Gradle 2.4 and plugin 1.+: • Performance increase • Incremental builds and caching • Jack The Compiler - Java -> Dex • Better variant/flavour management
  • 10. Design support library Navigation view: <android.support.design.widget.NavigationView 
 android:id="@+id/nav_view" android:layout_height="match_parent" 
 android:layout_width="wrap_content" 
 android:layout_gravity="start" 
 android:fitsSystemWindows="true" 
 app:headerLayout="@layout/nav_header" app:menu="@menu/drawer_view"/> 
 
 <menu xmlns:android="http://schemas.android.com/apk/res/android"> 
 
 <group android:checkableBehavior="single"> 
 <item 
 android:id="@+id/nav_home" 
 android:icon="@drawable/ic_dashboard" 
 android:title="Home" /> 
 

  • 11. Design support library • Uses colorAccent • Size can be fabSize=“mini" • Drawable set using src • Has to have borderWidth set if you want it to be round :) Floating Action Button
  • 12. Design support library • Anchor and anchor gravity • ScrollFlags - Behaviour of items on scroll • Scroll interpolators and content scrims • Behaviors - Defining user interactions with the view CoordinatorLayout
  • 13. Design support library • Toast-like view for quick feedback with an action Snackbar • Edit texts with labels floating above them. Much wow. Floating labels • Tabbed layout that can be both fixed and scrollable. Can be setUpWithViewpager(); Tab layout • Work together to create nice looking collapsable toolbars • Can use parallax and parallax multipliers • Still buggy AppBar layout and CollapsingToolbar
  • 14. Data binding • “Butterknife killer" • Currently in Beta, coming as a part of AS 1.3 • Write model bindings and simple view logic in layout XML file • Views can be even more passive > Cleaner code
  • 15. Data binding<layout xmlns:android="http://schemas.android.com/apk/res/android"> 
 <data> 
 <variable name="cheesy" type=“com.support.android.designlibdemo.Cheese"/> 
 </data> 
 <android.support.design.widget.CoordinatorLayout 
 POJO Model Parent layout <TextView android:layout_width=“match_parent" 
 android:layout_height=“wrap_content" 
 android:text="@{cheesy.text}" /> 
 public class Cheese { 
 public final String name; 
 public final String text; 
 public Cheese(String name, String text) {
 this.name = name; 
 this.text = text; 
 } 
 //Replaces setContentView(R.layout.activity_detail); with dynamically generated binding 
 binding = DataBindingUtil.setContentView(this, R.layout.activity_detail); 
 
 Cheese cheesy = new Cheese(cheeseName, getString(R.string.cheese_ipsum)); 
 //We bind our POJO to it 
 binding.setCheesy(cheesy); 
 //We can access views without using findViewById 
 binding.fab.setOnClickListener(new View.OnClickListener() { 
 @Override 
 public void onClick(View view) { 
 //Change the model 
 binding.setCheesy(new Cheese("Got", "Cheddar")); 
 
 } 
 }); 
 Activity:
  • 16. Data binding: • Most of Java expressions and operators are allowed • Missing super, this, new • Automatic null check • Observables can be used to automatically update UI on data change • BaseObservable and @Bindable annotations