Category: Design

Emo-gee, that’s a cool job. Meet the woman who designs Google’s emoji.

The Keyword July 17, 2018 Design

Editor’s Note: The She Word is a Keyword series all about dynamic and creative women at Google. Most of us use emoji to communicate on a daily basis, but there’s only one day a year to celebrate those delightful little characters. Today is World Emoji Day, so we sat down with Jennifer Daniel—who heads up design for Google’s emoji. Among other slightly more serious things, we chatted about her favorite emoji, how emoji communication compares to the era of Shakespeare and why the female influences in her life rule all.

JD

How do you explain your job at a dinner party?
I tell people I work on emoji, those tiny smiley faces that are on your phone. And the response is usually, “Really? That’s a job?”

It is a job, although the majority of my time is spent managing the art team within the “Expressions” group, which creates gifs, camera effects, stickers and other fun experiences for Gboard, Android Messages and Pixel.

What’s one habit that makes you successful?
Focus on finding good people to work with. Success follows people who work well together.

What advice do you have for women starting out in their careers?
Just be you. As women, we’re told over and over again to lean in, but that frequently puts us in positions that are structurally unsuited and hostile. This touches on every part of the job, even seemingly trivial things like tone in emails.

Research has shown that women don’t use emoji professionally or aren’t friendly in emails, because they’re taken less seriously if they do. I understand and also reject it … our humanity is essential to effective communication. Don’t use enough emoji and you’re seen as hostile. Use too many and you’re seen as unprofessional. It’s a lose lose. So, forget it. Just be yourself.

dancer

One of Jennifer’s illustrations of the dancer emoji. 

Who has been a strong female influence in your life?
In the industries I work in, there’s a lack of women in what my friends and I call the “just-ahead-of-me group.” So, I’d say my peers are the strongest influences in my life. The artists, writers and designers I’ve met along the way are incredibly motivating and inspiring. And, for those moments where things feel highly discouraging, well, I hope everyone has friends who pump them up like mine do, because it rules.

What’s your most-used emoji?
Lately instead of using the standard smiley 😀 (which is the 10th most popular emoji by the way … the most popular is ), I’ve been using the cowboy 🤠. I recently retired the party popper 🎉 for the saxophone 🎷. Everytime I use it, I can faintly hear Lisa Simpson

Your work is transforming the way we communicate with each other. Do you think we’re losing anything with this shift to communicating in gifs, emoji and memes?
Is the way we communicate now better than the era of Shakespeare?

Hey, I’m asking the questions!
I just mean … the way we communicate is a reflection of the time period we’re in. And we live in an era were we communicate more with the written word than ever before. Language has existed for at least 80,000 years but it first arose as speech. If humanity existed for 24 hours, let’s say writing only came around 11:07 p.m. So first there was speech, then writing, and now, we have emoji.

Some expressions are better suited for images than they are with text. I can’t tell you what 🐒🐒🎷🐬translates into words exactly, but damned if it isn’t the perfect response when a friend texts me that our plans are on for tonight. Emoji become inside jokes, slang, memes. Like language, it’s fluid. We all intuitively know when to call someone versus suggest a video chat, when to write an email or send them a text. It’s important to know who you’re speaking to and the best way to connect with them.

How did you first discover your interest in design?
Hard to say. It could be when I realized my drawings could make my classmates laugh. I was in second grade and I had just moved from the East Coast to the Midwest and it was the first time I really remember feeling heard. I truly connected with people in a way I hadn’t previously.

You have three-year old twins! What have they taught you about achieving balance in your life?
Work-life balance is when everyone wants your attention at the same time (ha, sort of kidding). At times my personal life is the most important thing and other times I need to be very focused on work. This balance, which is more of a dance, allows room for things to happen even when you least expect it, like when I get a call from the daycare and I have to drop everything to attend to … let’s just say, a pile of 💩. I’ve learned over time that you can’t be prepared for everything and that’s perfectly okay.  

baby gif

Just another day at the office. 

How do you ensure that everyone is represented in emoji?
We do our best to surround ourselves with experts and ask a lot of questions. Designing emoji (and stickers, and gifs and camera effects) for a global audience requires a certain level of humility and curiosity about the world.

And how does that work from a design perspective?
As a principle, we want to create images that are iconic and timeless. Stylistically,the more abstract an emoji is, the more you can project yourself onto it. On the flip side, the more detail a drawing has, the more people fixate on how real or accurate it is. Taking detail away from an emoji can offer more opportunity for interpretation and personality, making emoji an extension of your own. I prefer to think of Google’s emoji like words—keep them as abstract as possible.

What’s next for your team?
This week we’re releasing a series of animated stickers in Gboard and Messages that bring back our favorite blob emoji. And every month we launch more stickers and GIF effects in Gboard. I love seeing what people make, so please share your creations!

Cryptography Changes in Android P

Android Developers March 8, 2018 android p, Design, Develop, Featured, Google Play, security

Posted by Adam Vartanian, Software Engineer

We hope you’re enjoying the first developer preview of Android P. We wanted to specifically call out some backward-incompatible changes we plan to make to the cryptographic capabilities in Android P, which you can see in the developer preview.

Changes to providers

Starting in Android P, we plan to deprecate some functionality from the BC provider that’s duplicated by the AndroidOpenSSL (also known as Conscrypt) provider. This will only affect applications that specify the BC provider explicitly when calling getInstance() methods. To be clear, we aren’t doing this because we are concerned about the security of the implementations from the BC provider, rather because having duplicated functionality imposes additional costs and risks while not providing much benefit.

If you don’t specify a provider in your getInstance() calls, no changes are required.

If you specify the provider by name or by instance—for example, Cipher.getInstance("AES/CBC/PKCS7PADDING", "BC") or Cipher.getInstance("AES/CBC/PKCS7PADDING", Security.getProvider("BC"))—the behavior you get in Android P will depend on what API level your application targets. For apps targeting an API level before P, the call will return the BC implementation and log a warning in the application log. For apps targeting Android P or later, the call will throw NoSuchAlgorithmException.

To resolve this, you should stop specifying a provider and use the default implementation.

In a later Android release, we plan to remove the deprecated functionality from the BC provider entirely. Once removed, any call that requests that functionality from the BC provider (whether by name or instance) will throw NoSuchAlgorithmException.

Removal of the Crypto provider

In a previous post, we announced that the Crypto provider was deprecated beginning in Android Nougat. Since then, any request for the Crypto provider by an application targeting API 23 (Marshmallow) or before would succeed, but requests by applications targeting API 24 (Nougat) or later would fail. In Android P, we plan to remove the Crypto provider entirely. Once removed, any call to SecureRandom.getInstance("SHA1PRNG", "Crypto") will throw NoSuchProviderException. Please ensure your apps have been updated.

Understanding the performance benefits of ConstraintLayout

Android Developers August 24, 2017 Android, constraintlayout, Design, Develop, Featured, Layout, UI

Posted by Takeshi Hagikura, Developer Programs Engineer

Since announcing ConstraintLayout
at Google I/O last year, we’ve continued to improve the layout’s stability and
layout editor support. We’ve also added new features specific to
ConstraintLayout that help you build various type of layouts, such
as introducing
chains
and setting
size as a ratio
. In addition to these features, there is a notable
performance benefit by using ConstraintLayout. In this post, we’ll
walk through how you can benefit from these performance improvements.

How Android draws views?

To better understand the performance of ConstraintLayout, let’s
take a step back and see how Android draws views.

When a user brings an Android view into focus, the Android framework directs the
view to draw itself. This drawing process comprises 3 phases:

  1. Measure

    The system completes a top-down traversal of the view tree to determine how
    large each ViewGroup and View element should be. When a
    ViewGroup is measured, it also measures its children.

  2. Layout

    Another top-down traversal occurs, with each ViewGroup determining
    the positions of its children using the sizes determined in the measure phase.

  3. Draw

    The system performs yet another top-down traversal. For each object in the view
    tree, a Canvas object is created to send a list of drawing commands
    to the GPU. These commands include the ViewGroup and
    View objects’ sizes and positions, which the system determined
    during the previous 2 phases.

Figure 1. Example of how the measure phase traverses a view tree

Each phase within the drawing process requires a top-down traversal of the view
tree. Therefore, the more views you embed within each other (or nest) into the
view hierarchy, the more time and computation power it takes for the device to
draw the views. By keeping a flat hierarchy in your Android app layouts, you can
create a fast and responsive user interface for your app.

The expense of a traditional layout hierarchy

With that explanation in mind, let’s create a traditional layout hierarchy that
uses LinearLayout and RelativeLayout objects.

Figure 2. Example layout

Let’s say we want to build a layout like the image above. If you build it with
traditional layouts, the XML file contains an element hierarchy similar to the
following (for this example, we’ve omitted the attributes):

<RelativeLayout>
  <ImageView />
  <ImageView />
  <RelativeLayout>
    <TextView />
    <LinearLayout>
      <TextView />
      <RelativeLayout>
        <EditText />
      </RelativeLayout>
    </LinearLayout>
    <LinearLayout>
      <TextView />
      <RelativeLayout>
        <EditText />
      </RelativeLayout>
    </LinearLayout>
    <TextView />
  </RelativeLayout>
  <LinearLayout >
    <Button />
    <Button />
  </LinearLayout>
</RelativeLayout>

Although there’s usually room for improvement in this type of view hierarchy,
you’ll almost certainly still need to create a hierarchy with some nested views.

As discussed before, nested hierarchies can adversely affect performance. Let’s
take a look at how the nested views actually affect the UI performance using
Android Studio’s Systrace
tool. We called the measure and layout phases for each ViewGroup
(ConstraintLayout and RelativeLayout) programmatically
and triggered Systrace while the measure and layout calls are executing. The
following command generates an overview file that contains key events, such as
expensive measure/layout passes, that occur during a 20-second interval:

python $ANDROID_HOME/platform-tools/systrace/systrace.py --time=20 -o ~/trace.html gfx view res

For more details about how you can use Systrace, see the Analyzing UI
Performance with Systrace
guide.

Systrace automatically highlights the (numerous) performance problems with this
layout, as well as suggestions for fixing them. By clicking the “Alerts” tab,
you will find that drawing this view hierarchy requires 80 expensive passes
through the measure and layout phases!

Triggering that many expensive measure and layout phases is far from ideal; such
a large amount of drawing activity could result in skipped frames that users
notice. We can conclude that the layout has poor performance due to the nested
hierarchy as well as the characteristic of RelativeLayout, which
measures each of its children twice.

Figure 3. Looking at the alerts from Systrace for the
layout variant that uses RelativeLayout

You can check the entire code on how we performed these measurements in our GitHub
repository
.

The benefits of a ConstraintLayout object

If you create the same layout using ConstraintLayout, the XML file
contains an element hierarchy similar to the following (attributes again
omitted):

<android.support.constraint.ConstraintLayout>
  <ImageView />
  <ImageView />
  <TextView />
  <EditText />
  <TextView />
  <TextView />
  <EditText />
  <Button />
  <Button />
  <TextView />
</android.support.constraint.ConstraintLayout>

As this example shows, the layout now has a completely flat hierarchy. This is
because ConstraintLayout allows you to build complex layouts
without having to nest View and ViewGroup elements.

For example, let’s look at the TextView and EditText
in the middle of the layout:

When using a RelativeLayout, you need to create a new
ViewGroup to align the EditText vertically with the
TextView:
<LinearLayout
    android:id="@+id/camera_area"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    android:layout_below="@id/title" >

    <TextView
        android:text="@string/camera"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical"
        android:id="@+id/cameraLabel"
        android:labelFor="@+id/cameraType"
        android:layout_marginStart="16dp" />

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <EditText
            android:id="@+id/cameraType"
            android:ems="10"
            android:inputType="textPersonName"
            android:text="@string/camera_value"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:layout_marginTop="8dp"
            android:layout_marginStart="8dp"
            android:layout_marginEnd="8dp" />
    </RelativeLayout>
</LinearLayout>

By using ConstraintLayout instead, you can achieve the same effect
just by adding a constraint from the baseline of the TextView to
the baseline of the EditText without creating another
ViewGroup:

Figure 4. Constraint between EditText and TextView
<TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      app:layout_constraintLeft_creator="1"
      app:layout_constraintBaseline_creator="1"
      app:layout_constraintLeft_toLeftOf="@+id/activity_main_done"
      app:layout_constraintBaseline_toBaselineOf="@+id/cameraType" />

When running the Systrace tool for the version of our layout that uses
ConstraintLayout, you see far fewer expensive measure/layout passes
during the same 20-second interval. This improvement in performance makes sense,
now that we’re keeping the view hierarchy flat!

Figure 5. Looking at the alerts from Systrace for the
layout variant that uses ConstraintLayout

On a related note, we built the ConstraintLayout variant of our
layout using just the layout
editor
instead of editing the XML by hand. To achieve the same visual effect
using RelativeLayout, we probably would have needed to edit the XML
by hand.

Measuring the performance difference

We analyzed how long every measure and layout pass took for two type of layouts,
ConstraintLayout and RelativeLayout, by using
OnFrameMetricsAvailableListener,
which was introduced in Android 7.0 (API level 24). This class allows you to
collect frame-by-frame timing information about your app’s UI
rendering.

By calling the following code, you can start recording per-frame UI actions:

window.addOnFrameMetricsAvailableListener(
        frameMetricsAvailableListener, frameMetricsHandler);

After timing information becomes available, the app triggers the
frameMetricsAvailableListener() callback. We are interested in the
measure/layout performance, so we call FrameMetrics.LAYOUT_MEASURE_DURATION
when retrieving the actual frame duration.

Window.OnFrameMetricsAvailableListener {
        _, frameMetrics, _ ->
        val frameMetricsCopy = FrameMetrics(frameMetrics);
        // Layout measure duration in nanoseconds
        val layoutMeasureDurationNs = 
                frameMetricsCopy.getMetric(FrameMetrics.LAYOUT_MEASURE_DURATION);

To learn more about the other types of duration information that
FrameMetrics can receive, see the FrameMetrics
API reference.

Measurement results: ConstraintLayout is faster

Our performance comparison shows that ConstraintLayout performs
about 40% better in the measure/layout phase than RelativeLayout:

Figure 6. Measure / Layout (unit: ms, average of 100
frames)

As these results show, ConstraintLayout is likely to be more
performant than traditional layouts. Moreover, ConstraintLayout has
other features that help you build complex and performant layouts, as discussed
in the benefits of a ConstraintLayout
object
section. For details, see the Build
a Responsive UI with ConstraintLayout
guide. We recommend that you use
ConstraintLayout when designing your app’s layouts. In almost all
cases when you would have previously need a deeply-nested layout,
ConstraintLayout should be your go-to layout for optimal
performance and ease of use.

Appendix: Measurement environment

All the measurements above were performed in the following environment.

Device Nexus 5X
Android Version 8.0
ConstraintLayout version 1.0.2

What’s next

Check out the developer
guide
, the API
reference documentation
, and the article
on Medium
to fully understand what ConstraintLayout can provide
for you. And once again, thank you to all who submitted feedback and issues over
the months since our alpha release of ConstraintLayout. We’re truly
grateful that we were able to release the production-ready 1.0
version
of ConstraintLayout earlier this year.
As we continue to improve ConstraintLayout, please continue to send
us feedback using the Android issue tracker.

Page 1 of 1
Scroll Up