Implementing material design in your Android app

By Chris Banes and Nick Butcher, Android Developer Relations

Material design is a comprehensive approach to visual, interaction and motion design for the multi-screen world. Android 5.0 Lollipop and the updated support libraries help you to create material UIs. Here’s a rundown of some of the major elements of material design and the APIs and widgets that you can use to implement them in your app.

Tangible surfaces

In material design, UIs are composed of pieces of digital paper & ink. The surfaces and the shadows they cast provide visual cues to the structure of the application, what you can touch and how it will move. This digital material can move, expand and reform to create flexible UIs.

Shadows

A surface’s position and depth result in subtle changes in lighting and shadows. The new elevation property lets you specify a view’s position on the Z-axis and the framework then casts a real-time dynamic shadow on items behind it. You can set the elevation declaratively in your layouts, defined in dips:

<ImageView …
    android:elevation="8dp" />

You can also set this from code using getElevation()/setElevation() (with shims in ViewCompat). The shadow a view casts is defined by its outline, which by default is derived from its background. For example if you set a circular shape drawable as the background for a floating action button, then it would cast an appropriate shadow. If you need finer control of a view’s shadow, you can set a ViewOutlineProvider which can customise the Outline in getOutline().

Cards

Cards are a common pattern for creating surfaces holding a distinct piece of information. The new CardView support library allows you to create them easily, providing outlines and shadows for you (with equivalent behaviour on prior platforms).

<android.support.v7.widget.CardView
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
    <!-- Your card content -->

</android.support.v7.widget.CardView>

CardView extends FrameLayout and provides default elevation and corner radius for you so that cards have a consistent appearance across the platform. You can customise these via the cardElevation and cardCornerRadius attributes, if required. Note that Cards are not the only way of achieving dimensionality and you should be wary of over-cardifying your UI!

Print-like Design

Material utilises classic principles from print design to create clean, simple layouts that put your content front and center. Bold deliberate color choices, intentional whitespace, tasteful typography and a strong baseline grid create hierarchy, meaning and focus.

Typography

Android 5.0 updates the system font Roboto to beautifully and clearly display text no matter the display size. A new medium weight has been added (android:fontFamily=”sans-serif-medium”) and new TextAppearance styles implement the recommended typographic scale for balancing content density and reading comfort. For instance you can easily use the ‘Title’ style by setting android:textAppearance=”@android:style/TextAppearance.Material.Title”. These styles are available on older platforms through the AppCompat support library, e.g. “@style/TextAppearance.AppCompat.Title”.

Color

Your application’s color palette brings branding and personality to your app so we’ve made it simple to colorize UI controls by using the following theme attributes:

  • colorPrimary. The primary branding color for the app; used as the action bar background, recents task title and in edge effects.
  • colorAccent. Vibrant complement to the primary branding color. Applied to framework controls such as EditText and Switch.
  • colorPrimaryDark. Darker variant of the primary branding color; applied to the status bar.

Further attributes give fine grained control over colorizing controls, see: colorControlNormal, colorControlActivated, colorControlHighlight, colorButtonNormal, colorSwitchThumbNormal, colorEdgeEffect, statusBarColor and navigationBarColor.

AppCompat provides a large subset of the functionality above, allowing you to colorize controls on pre-Lollipop platforms.

Dynamic color

Material Design encourages dynamic use of color, especially when you have rich images to work with. The new Palette support library lets you extract a small set of colors from an image to style your UI controls to match; creating an immersive experience. The extracted palette will include vibrant and muted tones as well as foreground text colors for optimal legibility. For example:

Palette.generateAsync(bitmap,
        new Palette.PaletteAsyncListener() {
    @Override
    public void onGenerated(Palette palette) {
         Palette.Swatch vibrant =
                 palette.getVibrantSwatch();
          if (swatch != null) {
              // If we have a vibrant color
              // update the title TextView
              titleView.setBackgroundColor(
                  vibrant.getRgb());
              titleView.setTextColor(
                  vibrant.getTitleTextColor());
          }
    }
});

Authentic Motion

Tangible surfaces don’t just appear out of nowhere like a jump-cut in a movie; they move into place helping to focus attention, establish spatial relationships and maintain continuity. Materials respond to touch to confirm your interaction and all changes radiate outward from your touch point. All motion is meaningful and intimate, aiding the user’s comprehension.

Activity + Fragment Transitions

By declaring ‘shared elements’ that are common across two screens you can create a smooth transition between the two states.

album_grid.xml
…
    <ImageView
        …
        android:transitionName="@string/transition_album_cover" />
album_details.xml
…
    <ImageView
        …
        android:transitionName="@string/transition_album_cover" />

AlbumActivity.java
Intent intent = new Intent();
String transitionName = getString(R.string.transition_album_cover);
…
ActivityOptionsCompat options =
ActivityOptionsCompat.makeSceneTransitionAnimation(activity,
    albumCoverImageView,   // The view which starts the transition
    transitionName    // The transitionName of the view we’re transitioning to
    );
ActivityCompat.startActivity(activity, intent, options.toBundle());

Here we define the same transitionName in two screens. When starting the new Activity and this transition is animated automatically. In addition to shared elements, you can now also choreograph entering and exiting elements.

Ripples

Materials respond to users’ touch with an ink ripple surface reaction. Interactive controls such as Buttons exhibit this behaviour by default when you use or inherit from Theme.Material (as will ?android:selectableItemBackground). You can add this feedback to your own drawables by simply wrapping them in a ripple element:

<ripple
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="@color/accent_dark">
    <item>
        <shape
            android:shape="oval">
            <solid android:color="?android:colorAccent" />
        </shape>
    </item>
</ripple>

Custom views should propagate touch location down to their drawables in the View#drawableHotspotChanged callback so that the ripple can start from the touch point.

StateListAnimator

Materials also respond to touch by raising up to meet your finger, like a magnetic attraction. You can achieve this effect by animating the translationZ attribute which is analogous to elevation but intended for transient use; such that Z = elevation + translationZ. The new stateListAnimator attribute allows you to easily animate the translationZ on touch (Buttons do this by default):

layout/your_layout.xml
<ImageButton …
    android:stateListAnimator="@anim/raise" />
anim/raise.xml
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_enabled="true" android:state_pressed="true">
        <objectAnimator
            android:duration="@android:integer/config_shortAnimTime"
            android:propertyName="translationZ"
            android:valueTo="@dimen/touch_raise"
            android:valueType="floatType" />
    </item>
    <item>
        <objectAnimator
            android:duration="@android:integer/config_shortAnimTime"
            android:propertyName="translationZ"
            android:valueTo="0dp"
            android:valueType="floatType" />
    </item>
</selector>

Reveal

A hallmark material transition for showing new content is to reveal it with an expanding circular mask. This helps to reinforce the user’s touchpoint as the start of all transitions, with its effects radiating outward radially. You can implement this using the following Animator:

Animator reveal = ViewAnimationUtils.createCircularReveal(
                    viewToReveal, // The new View to reveal
                    centerX,      // x co-ordinate to start the mask from
                    centerY,      // y co-ordinate to start the mask from
                    startRadius,  // radius of the starting mask
                    endRadius);   // radius of the final mask
reveal.start();

Interpolators

Motion should be deliberate, swift and precise. Unlike typical ease-in-ease-out transitions, in Material Design, objects tend to start quickly and ease into their final position. Over the course of the animation, the object spends more time near its final destination. As a result, the user isn’t left waiting for the animation to finish, and the negative effects of motion are minimized. A new fast-in-slow-out interpolator has been added to achieve this motion.

For elements entering and exiting the screen (which should do so at peak velocity), check out the linear-out-slow-in and fast-out-linear-in interpolators respectively.

Adaptive design

Our final core concept of material is creating a single adaptive design that works across devices of all sizes and shapes, from watches to giant TVs. Adaptive design techniques help us realize the vision that each device reflects a different view of the same underlying system. Each view is tailored to the size and interaction appropriate for that device. Colors, iconography, hierarchy, and spatial relationships remain constant. The material design system provides flexible components and patterns to help you build a design that scales.

Toolbar

The toolbar is a generalization of the action bar pattern, providing similar functionality, but much more flexibility. Unlike the standard action bar, toolbar is a view in your hierarchy just like any other, so you can place instances wherever you like, interleave them with the rest of your views, animate, react to scroll events and so on. You can make the Toolbar act as your Activity’s Action Bar by calling Activity.setActionBar().

In this example, the blue toolbar is an extended height, overlaid by the screen content and provides the navigation button. Note that two further toolbars are used in the list and detail views.

For details of implementing toolbars, see this post.

Go Forth and Materialize

Material Design helps you to build understandable, beautiful and adaptive apps, which are alive with motion. Hopefully, this post has inspired you to apply these principles to your app and signposted some of the new (and compatibility) APIs to achieve this.

Dynamic creative tools support programmatic media buys

Cross-posted from the DoubleClick Advertiser blog

As we introduced on Wednesday and explained further yesterday, it’s critical to pair your media buying strategies with smart creative strategies to develop more successful digital campaigns. A media buy is only as good as the creative that goes into it! 


Our second creative and media pairing revolves around the idea of programmatic: When you are buying your media programmatically (automatically, in real-time, with granular information about each viewer) you should also be building your creative messages automatically, in real time, for every viewer. Dynamic creative is a technique that advertisers can use to accomplish these real-time messages.



Did you know? Consumers are twice as likely to engage with real-time advertising than they are with generic ads.* 

Dynamic creative is a powerful and flexible system that lets marketers create a single ad template and then swap in creative variations to fit each viewer. What's more, it does it in real time: changing headlines, images, copy and calls to action depending on variables like the user's demographic, their location and the device they're using at the moment they see the ad. 

People may be familiar with the idea of dynamic creative for direct response campaigns (i.e. showing a product based on what someone already viewed), but there are also clever ways to incorporate dynamic creative for brand awareness campaigns. 

For example, Nike used dynamic creative to fuel their real-time “Phenomenal Shot” campaign for the World Cup. Nike wanted to deliver experiences that related to live moments in the soccer matches. They used an HTML5 dynamic template, which allowed them to create and manage one flexible ad—instead of hundreds of custom-built ads—that could run across screens. 

To accommodate dozens of ad alternatives localized for 15 different languages, they created a Google Spreadsheet template that served as their dynamic feed to generate ads. Once the dynamic feed was set up, they could generate the ads quickly by updating the spreadsheet, which minimized the effort and speed of releasing ads in real time. The spreadsheet was robust yet simple enough that the ads could be updated without assistance from technical or creative employees.


Nike cleverly used dynamic creative as a way to bring live moments into their ad campaigns in real-time. Knowing that their viewers were on their phones as they were watching the soccer matches, Nike made sure their ads could show up on smartphones and tablets, to grab users’ attention and engagement during commercials or breaks in the game. 

As brands buy more reservation-based ads through programmatic channels, using the information about their audiences in their creative is going to become increasingly important. To accomplish these smart creative campaigns, Advertisers must include both the media agency and the creative agency in the room at the outset of the campaign. This will enable the agencies to develop creative and media plans that are aligned. 

To learn more about how to pair dynamic creative with your programmatic media buy, visit our dynamic solutions page and select the vertical that is relevant for you. 

And come back on Monday for our third pairing: Mobile media buys and HTML5 creative. 

Posted by Becky Chappell, Product Marketing Manager, DoubleClick

*source: “Media Economy Report: How Data is Changing our Business,” Jan. 2014, Magna Global

Dynamic creative tools support programmatic media buys


As we introduced on Wednesday and explained further yesterday, it’s critical to pair your media buying strategies with smart creative strategies to develop more successful digital campaigns. A media buy is only as good as the creative that goes into it! 

Our second creative and media pairing revolves around the idea of programmatic: When you are buying your media programmatically (automatically, in real-time, with granular information about each viewer) you should also be building your creative messages automatically, in real time, for every viewer. Dynamic creative is a technique that advertisers can use to accomplish these real-time messages.

Did you know? Consumers are twice as likely to engage with real-time advertising than they are with generic ads.* 

Dynamic creative is a powerful and flexible system that lets marketers create a single ad template and then swap in creative variations to fit each viewer. What's more, it does it in real time: changing headlines, images, copy and calls to action depending on variables like the user's demographic, their location and the device they're using at the moment they see the ad. 

People may be familiar with the idea of dynamic creative for direct response campaigns (i.e. showing a product based on what someone already viewed), but there are also clever ways to incorporate dynamic creative for brand awareness campaigns. 

For example, Nike used dynamic creative to fuel their real-time “Phenomenal Shot” campaign for the World Cup. Nike wanted to deliver experiences that related to live moments in the soccer matches. They used an HTML5 dynamic template, which allowed them to create and manage one flexible ad—instead of hundreds of custom-built ads—that could run across screens. 

To accommodate dozens of ad alternatives localized for 15 different languages, they created a Google Spreadsheet template that served as their dynamic feed to generate ads. Once the dynamic feed was set up, they could generate the ads quickly by updating the spreadsheet, which minimized the effort and speed of releasing ads in real time. The spreadsheet was robust yet simple enough that the ads could be updated without assistance from technical or creative employees.


Nike cleverly used dynamic creative as a way to bring live moments into their ad campaigns in real-time. Knowing that their viewers were on their phones as they were watching the soccer matches, Nike made sure their ads could show up on smartphones and tablets, to grab users’ attention and engagement during commercials or breaks in the game. 

As brands buy more reservation-based ads through programmatic channels, using the information about their audiences in their creative is going to become increasingly important. To accomplish these smart creative campaigns, Advertisers must include both the media agency and the creative agency in the room at the outset of the campaign. This will enable the agencies to develop creative and media plans that are aligned. 

To learn more about how to pair dynamic creative with your programmatic media buy, visit our dynamic solutions page and select the vertical that is relevant for you. 

And come back on Monday for our third pairing: Mobile media buys and HTML5 creative. 

Posted by Becky Chappell, Product Marketing Manager, DoubleClick

*source: “Media Economy Report: How Data is Changing our Business,” Jan. 2014, Magna Global

Introducing the Google News Publisher Center

If you're a news publisher, your website has probably evolved and changed over time -- just like your stories. But in the past, when you made changes to the structure of your site, we might not have discovered your new content. That meant a lost opportunity for your readers, and for you. Unless you regularly checked Webmaster Tools, you might not even have realized that your new content wasn’t showing up in Google News. To prevent this from happening, we are letting you make changes to our record of your news site using the just launched Google News Publisher Center.

With the Publisher Center, your potential readers can be more informed about the articles they’re clicking on and you benefit from better discovery and classification of your news content. After verifying ownership of your site using Google Webmaster Tools, you can use the Publisher Center to directly make the following changes:
  • Update your news site details, including changing your site name and labeling your publication with any relevant source labels (e.g., “Blog”, “Satire” or “Opinion”)
  • Update your section URLs when you change your site structure (e.g., when you add a new section such as http://example.com/2014commonwealthgames or http://example.com/elections2014)
  • Label your sections with a specific topic (e.g., “Technology” or “Politics”)
Whenever you make changes to your site, we’d recommend also checking our record of it in the Publisher Center and updating it if necessary.

Try it out, or learn more about how to get started.

We’d love to hear from you about what works well and what doesn’t. Ultimately, our goal is to make this a platform where news publishers and Google News can work together to provide readers with the best, most diverse news on the web.

Posted by Eric Weigle, Software Engineer


====  


Présentation du centre des éditeurs de Google Actualités

Si vous êtes éditeur d'actualités, votre site Internet a probablement évolué avec le temps, tout comme les informations que vous y publiez. Or par le passé, lorsque vous apportiez des modifications à la structure de votre site, Google n'avait pas forcément donné de visibilité à votre nouveau contenu. Ce qui représentait une opportunité manquée pour vos lecteurs comme pour vous. A moins d'aller vérifier régulièrement vos outils de Webmaster, vous ne vous étiez peut-être même pas rendu compte que votre nouveau contenu n'apparaissait pas dans Google Actualités. Pour éviter que cela ne se produise, Google vous permet désormais d'aller modifier la fiche de votre site d'actualités, grâce au tout nouveau Centre des éditeurs Google Actualités.

Avec le Centre des éditeurs, vos lecteurs potentiels auront plus d'informations sur les articles qu'ils veulent consulter, et vos nouveaux contenus bénéficieront de plus de visibilité et d'un meilleur classement. Une fois la propriété de votre site vérifiée à l'aide les outils Webmaster de Google, vous pouvez utiliser le Centre des éditeurs pour apporter directement les changements suivants :
  • Mise à jour des informations relatives à votre site d'actualités, notamment le nom de votre site et le libellé de vos contenus en utilisant des libellés source appropriés (par ex., “Blog”, “Critique” ou “Opinion”)
  • Mise à jour des URL de vos rubriques lorsque vous modifiez la structure de votre site (par ex., si vous ajoutez une nouvelle section telle que http://example.com/2014commonwealthgames ou http://example.com/elections2014)
  • Rubriquage de vos contenus dans des domaines spécifiques (par ex., “Technologie” ou “Politique”)
Chaque fois que vous modifiez votre site, nous vous recommandons de vérifier également la fiche qui lui est associée dans le Centre des éditeurs et de la mettre à jour si nécessaire.

Essayez-le ou renseignez-vous pour savoir comment faire ses premiers pas avec Google Actualités.

Nous serions ravis d'avoir votre avis sur ce qui marche et ce qui ne marche pas. Notre objectif est de proposer une plateforme où cohabitent les actualités des éditeurs et celles de Google pour offrir le meilleur des actualités sur Internet en termes de contenus et de diversité.

Publié par Eric Weigle, ingénieur logiciel.

Street View arrives in Luxembourg

Luxembourg is the heart of Europe and boasts an above average number of beautiful sites, from the medieval Grund neighborhood in the capital to the ridges of the Moselle River and the sparkling modern Kirchberg center for European Union buildings. And now, thanks to Street View in Google Maps anyone, anywhere can visit these sites from their desktop computer or mobile device.



Viewers can access images taken at street level in two ways, either by dragging the "Pegman" character, located at the bottom right of the map, onto a place highlighted in blue, or by clicking a spot on the map and selecting Street View in the top left of the display window that pops up.

Street View offers myriad benefits. Check what looks like a restaurant before going there; find a place to park the car before you leave the house to go shopping; arrange a meeting point in an unfamiliar location; or help your kids bring their geography studies to life! If you are interested in buying a home, you can explore the area with a few clicks of a mouse; people in wheelchairs can figure out whether places have sufficient access before making a trip.

Street View is all about making Google Maps more useful, comprehensive and interesting for people, and we’re delighted people can now discover all that Luxembourg has to offer.

Getting Your Apps Ready for Nexus 6 and Nexus 9

By Katherine Kuan, Developer Advocate

Updated material design Tumblr app on Nexus 6.

Last week, we unveiled the Nexus 6 and Nexus 9, the newest additions to our Nexus family that will ship with Android 5.0 Lollipop. Together, they deliver a pure Google experience, showcasing fresh visual styles with material design, improved performance, and additional features.

Let’s make sure your apps and games are optimized to give your users the best mobile experience on these devices. We’ve outlined some best practices below.

Nexus 6

Screen

The Nexus 6 boasts an impressive 5.96” Quad HD screen display at a resolution of 2560 x 1440 (493 ppi). This translates to ~ 730 x 410 dp (density independent pixels).

Check your assets

It has a quantized density of 560 dpi, which falls in between the xxhdpi and xxxhdpi primary density buckets. For the Nexus 6, the platform will scale down xxxhdpi assets, but if those aren’t available, then it will scale up xxhdpi assets.

Provide at least an xxxhdpi app icon because devices can display large app icons on the launcher. It’s best practice to place your app icons in mipmap- folders (not the drawable- folders) because they are used at resolutions different from the device’s current density. For example, an xxxhdpi app icon can be used on the launcher for an xxhdpi device.

res/
   mipmap-mdpi/
      ic_launcher.png
   mipmap-hdpi/
      ic_launcher.png
   mipmap-xhdpi/
      ic_launcher.png  
   mipmap-xxhdpi/
      ic_launcher.png
   mipmap-xxxhdpi/   
      ic_launcher.png  # App icon used on Nexus 6 device launcher

Choosing to add xxxhdpi versions for the rest of your assets will provide a sharper visual experience on the Nexus 6, but does increase apk size, so you should make an appropriate decision for your app.

res/
   drawable-mdpi/
      ic_sunny.png
   drawable-hdpi/
      ic_sunny.png
   drawable-xhdpi/   
      ic_sunny.png
   drawable-xxhdpi/  # Fall back to these if xxxhdpi versions aren’t available
      ic_sunny.png 
   drawable-xxxhdpi/ # Higher resolution assets for Nexus 6
      ic_sunny.png

Make sure you are not filtered on Google Play

If you are using the <compatible-screens> element in the AndroidManifest.xml file, you should stop using it because it’s not scalable to re-compile and publish your app each time new devices come out. However, if you must use it, make sure to update the manifest to add the configuration for these devices (by screen size and density). Otherwise your app may be excluded from Google Play search results on these devices.

Nexus 9

Screen

The Nexus 9 is a premium 8.9” tablet with a screen size of 2048 x 1536 pixels (288 ppi), which translates to 1024 x 768 dip. This is a 4:3 aspect ratio, which is unique compared to earlier tablets. The Nexus 9 falls into the xhdpi density bucket, and you should already have assets in the drawable-xhdpi folder.

Updated Material Design Wall Street Journal app on Nexus 9.

Enable NDK apps for 64-bit

The Nexus 9 runs on a 64-bit Dual Core processor, which makes it the first Android device to ship with a 64-bit ARM instruction set. Support for 64-bit processors was just added in Android 5.0, so if you have an NDK app, enable it by updating the APP_ABI value in your Application.mk file:

APP_ABI := armeabi armeabi-v7a arm64-v8a x86 x86_64 mips mips64

More detailed instructions are provided in the developer site. You can test your 64-bit enabled app on a physical device with a 64-bit processor running Android 5.0, or take advantage of the recently announced 64-bit emulator in Android Studio.

Update your hardware keyboard support

The Nexus 9 Keyboard Folio will be available as an accessory in Google Play. It’s very important that you don’t lock your app to a single orientation. The Nexus 9’s natural orientation is portrait mode, while it’s used in landscape mode with the keyboard. If you lock to the device’s natural orientation, the app may appear sideways for devices with keyboards.

Users should be able to navigate around the main content of the app with the keyboard, while relying on touch input or keyboard shortcuts for toolbar actions and button bars. Therefore, ensure that your app has proper keyboard navigation and shortcuts for primary actions. Keyboard shortcuts that are invoked with Ctrl + [shortcut] combo can be defined via menu items using:

<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:id="@+id/menu_create"
        android:title="@string/menu_create"
        android:alphabeticShortcut="c” />
</menu/>

Alternatively, shortcuts can be defined using Activity#onKeyShortcut or View#onKeyShortcut. Learn more about keyboard actions here.

In MainActivity.java:

@Override
public boolean onKeyShortcut(int keyCode, KeyEvent event) {
    switch (keyCode) {
        case KeyEvent.KEYCODE_R:
            Toast.makeText(this, "Reply", Toast.LENGTH_SHORT).show();
            return true;
        default:
            return super.onKeyShortcut(keyCode, event);
    }
}

Responsive layouts with w- and sw- qualifiers

In order to take advantage of the screen real estate on the Nexus 6 and Nexus 9, we emphasize the importance of responsive design. In the past, if you assumed that landscape mode is significantly wider than portrait mode, you may run into problems on a device like the Nexus 9, which has an aspect ratio of 4:3. Instead of declaring layouts using the layout-land or layout-port resource folder qualifiers, we strongly recommend switching to the w<N>dp width resource folder qualifier so that content is laid out based on available screen width.

Think about content first and foremost. Decide on min and max screen real estate that your content requires, and determine cutoff points at different screen widths where you can modify the layout composition for your app (# of grid columns, multi-pane layout, etc…).

For example, a single pane layout for your main activity on phones can be defined in:

res/layout/activity_main.xml

On larger screen devices, where the current orientation is at least 600dp in width, a new two-pane layout with a list alongside a detail pane could be declared in:

res/layout-w600dp/activity_main.xml

On even larger screen devices, where the current orientation is at least 720dp in width, a new multi-pane layout where the detail pane requires even more horizontal space could be declared in:

res/layout-w720dp/activity_main.xml

As for attributes based on form factor, instead of declaring them in values-large or values-xlarge resource directories, use the sw<N>dp smallest width qualifier. For example, you could style your TextViews to have a medium font size on phones.

In res/values/styles.xml:

<style name="DescriptionTextStyle">
  <item name="android:textAppearance">?android:attr/textAppearanceMedium</item>
</style>

Meanwhile, TextViews could have a large font size when the smallest width of the device (taking the minimum of the landscape and portrait widths) is 600dp or wider. This ensures the font size of your app doesn’t change when you rotate this large screen device.

In res/values-sw600dp/styles.xml:

<style name="DescriptionTextStyle">
  <item name="android:textAppearance">?android:attr/textAppearanceLarge</item>
</style> 

Take advantage of 5.0 and Material

Set your android:targetSdkVersion to "21". Take note of the important behavior changes in Android 5.0 Lollipop including ART, the new Android runtime, to ensure that your app continues to run well. You can also leverage new platform APIs like richer notifications.

Nexus 6 and Nexus 9 users will be immersed in the new world of material design, and they’ll expect the same seamless transitions, bold colors, and delightful details from your app. As you invest time in bringing your app up to date with our latest design language, there’s a whole host of resources to help you make the leap, including important new updates to the support library, videos, and a getting started guide. Good luck and we can’t wait to see your apps!

Add-ons for Google Forms

In the spirit of giving you even more flexibility and customization, we’re launching add-ons for Google Forms--new tools, created by developer partners, that bring even more features to your surveys (just like add-ons for Docs and Sheets).

Check out the growing list of available add-ons, several of which are particularly relevant for education, from the “Add-ons” menu in Forms, or by directly visiting the Forms add-ons store.

If you have already disabled add-ons for your domain in the Admin console, Forms add-ons will be defaulted off. To change this setting, click on Google Apps -> Drive > General Settings and check/un-check the “Allow users to install Google Docs add-ons” box.

Release track:
Rapid release and Scheduled release

For more information:
Help Center

Note: all launches are applicable to all Google Apps editions unless otherwise noted

whatsnew.googleapps.com
Get these product update alerts by email
Subscribe to the RSS feed of these updates

Introducing Add-ons for Google Forms

Cross-posted from the Google Apps Updates blog.

Google Forms is a free and simple way to collect information — from quickly polling your friends about who'll be attending your trip to the haunted hayride, to getting thousands of responses to an awareness survey for work.

Over the last few months, Forms has been getting a bunch of updates to help you make good looking surveys, like new theme choices and the ability to create your own personalized themes.

To give you even more flexibility and options, we’re introducing add-ons for Forms—new tools, created by developer partners, that deliver even more features to your surveys (just like add-ons for Docs and Sheets).

Add-ons bring handy extras to your survey building experience, like setting a survey end date, sending custom emails based on responses, storing lists of choices that you frequently add to questions, and more.

You can access Add-ons from the “Add-ons” menu in Forms, or by directly visiting the Forms add-on store.



Here are just a few of the growing list of add-ons that you can use today with Google Forms:
  • formLimiter: Close your survey automatically, after a maximum number of responses is reached, or at a date and time of your choosing. 
  • Ultradox Trigger: Create custom emails, reports, invoices, newsletters, etc., based on information that people enter into your form. 
  • Form Values: Store and pull from lists that you use regularly in Forms, like a list of staff, students, rooms, resources or anything you want. 
We hope these new tools make your Forms creation process even easier and more helpful--and stay tuned for more--our developer partners will be launching even more add-ons in the coming weeks. 

PS: If you’re a developer with ideas for creating your own add-on for Forms, here’s some documentation to get you started.

Posted by Saurabh Gupta, Product Manager

DoubleClick Search: Using real-time data to optimize your search ads and Shopping Campaigns

This is the second in a series of posts on real-time advertising. Last week, we wrote about the real-time gap and how access to real-time data can positively affect online sales and results. This week, we’re writing about how real-time data can help you optimize text ads and Shopping campaigns.


Don’t underestimate the long tail 
Retailers today often have hundreds or thousands of products, but a recent study shows they only advertise an average of 49% of their inventory with search ads. There are two main reasons for this. One is that advertisers just can’t manage millions of keywords and bids on their own. The other is that they often don’t see the value of their long-tail inventory items.

However, forgetting the long tail can mean missed opportunities. While each additional item advertised may not contribute a lot of sales on its own, aggregated sales for long-tail items can have a significant bottom-line impact.

Create and optimize Shopping Campaigns with inventory-aware campaigns 
Our customers have told us Shopping campaigns are a critical tool to automate ad creation, management, and bid optimization. Integrating with Google Merchant Center - from feed to ad creation - helps retailers be “real-time” in responding to the many seasonal assortment changes, new product launches and inventory status changes. They can afford to traffic and manage the full product catalog, without risking losing track of a promotion or out-of-stock and paying for that “ad to nowhere”. Last year Piston saw big success with inventory management, with over 50% gains in both ROAS and conversions.

Umut Dincer, The Home Depot’s Director of Online Marketing shares: “Our strong partnership with DoubleClick Search has been a great source of revenue for The Home Depot using the Google Merchant Center and Shopping campaigns to merchandize inventory.”

Organize products intelligently with Adaptive Shopping Campaigns
Beyond expanding product coverage, advertisers can also improve performance with sound product group structure. Adaptive Shopping campaigns leverage real-time conversion data to automatically change Shopping Campaign structure to optimize performance gains. When items in product groups have similar conversion rates, DoubleClick Search can assign better bids and reduce inefficiencies in spend.

By looking at advertiser data, we found, for example, that 90% of the median advertiser’s Shopping campaign cost came from only 9.5% of its products.* Often, it turned out, advertisers were lumping high-performance products into product groups with other, lower-converting products. The end result: bids that were too low for their top-selling products and bids that were too high for their lower-revenue items.

Andrea Bywater, Marketing Coordinator of Paid Search at BuildDirect says, “Adaptive shopping campaigns will be incredibly helpful in grouping ‘winning’ SKUs together—especially when things get busier with the holidays, and with Black Friday around the corner. Not only will this save time; it’ll help us save money on products with lower conversion rates.”

Link purchases to ads with Purchase detail reports 
A third way for retailers to increase their advertising efficiencies with real-time data is to allow them to connect their ads with product sales. Linking ads and sales used to be a complex task requiring deep analysis and a lot of data. As a result, advertisers often skipped over this analysis, missing out on key insights like which keywords sold which products. We designed Purchase detail reports to meet this customer need.

Purchase detail reports help advertisers:
  • Identify the impact of advertising on business goals like maximizing profitability or selling off inventory
  • Improve ad targeting by matching ads to products that consumers are most interested in
  • Understand the value of brand and general terms in selling your highest margin or most important products
Justin Johnson, Paid Search Manager at Cabela’s explains, “Having insights into where we spend our money, in addition to what people are looking for, has been invaluable in helping us make better decisions. We have a better look into where we may not have adequate coverage, and are able to quickly make changes to address that. Being able to pull in margin data to see if certain keywords are better or worse at driving profitable traffic than we anticipated helps us be more thoughtful with our spend.”

Real-time in real life 
In the next edition we’ll shift our focus to a real-time use case: smartphone launches. We’ll have a look at how real-time capabilities make a difference on big sales days, where competition and volatility are high.

*DoubleClick Search internal data, 2014

GPS on Android Wear Devices

By Wayne Piekarski, Developer Advocate

With the latest release of Android Wear, wearables with built-in GPS like the Sony Smartwatch 3 can now give you a GPS location update directly from the wearable, without a paired phone nearby. You can now build an app like MyTracks that lets a user track their run even when they leave their phone at home. For wearable devices that do not have built-in GPS, a software solution has always existed in Google Play Services that automatically uses the GPS from your connected phone.

The Golfshot wearable app uses built-in GPS to calculate your distance to the next hole, even when you don’t have your phone with you.

Implementing GPS location updates for Android Wear is simple. On the wearable, use the FusedLocationProviderApi from Google Play services to request location updates. This is the same API that has been available on mobile, so you can easily reuse your existing code and samples.

FusedLocationProviderApi automatically makes the most power-efficient decision about where to get location updates. If the phone is connected to the wearable, it uses the GPS on the phone and sends the updates to the wearable. If the phone is not connected to the wearable and the wearable has a built-in GPS, then it uses the wearable’s GPS.

One case you’ll need to handle is if the phone is not connected to the wearable and the wearable does not have built-in GPS. You will need to detect this and provide a graceful recovery mechanism, such as a message telling the user to bring their phone with them. However, for the most part, deciding which GPS to use, and sending the position from the phone to the wearable, is handled automatically. You do not need to deal with the low-level implementation details yourself.

When writing an app that runs on the wearable, you will eventually want to synchronize the data it collects with the paired phone. When the wearable is being taken out for a run, especially with the built-in GPS, there may not be a phone present. So you will want to store your location data using the Data Layer API, and when the phone reconnects with the wearable later, the data will be automatically synchronized.

For more details about how to use the location API, check out the extensive documentation and sample here.

Also, as a heads up, starting on November 3 with the public release of Android 5.0, you will be able to submit your apps for clearer designation as Android Wear apps on Google Play. If your apps follow the criteria in the Wear App Quality checklist and are accepted as Wear apps on Play, it will be easier for Android Wear users to discover your apps. Stay tuned for more information about how to submit your apps for Android Wear review through the Google Play Developer Console.