Date post: | 03-Aug-2015 |
Category: |
Software |
Upload: | infinum-ltd |
View: | 135 times |
Download: | 0 times |
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-ConfirmCredentialhttps://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 libraryNavigation 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 actionSnackbar
• 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