It turns out that not loading and decoding all those assets on startup gives you an awesome speed win this alone reduced the app startup time by 120 milliseconds across devices (an improvement of roughly 10–20%, depending on the device). We went from 29 assets to display the title bar and tab bar to 8. In the end, we were able to dramatically reduce the number of assets needed display the Instagram UI when the app starts. We keep a static cache of immutable ColorFilter objects and reuse them all over the app. You can apply a ColorFilter to a Drawable or an ImageView, and it will change the rendered output. Asset tinting is touted as a new feature in the upcoming Android L release, but it’s actually been possible in all versions of Android. This allows us to eliminate separate assets for different UI states. In a flat world, all of our assets are simply shapes, and we can change their colors at runtime. One of the techniques we use widely through the app is “asset tinting,” the ability to colorize assets programmatically. The result is that most Instagram’s Android users now experience a more ergonomically friendly flow, with all the editing and camera controls easily within reach of your thumb. At the same time, medium- and large-sized screens received an expanded layout that better utilized the available pixels. To do this we divided screens into four buckets, based on aspect ratio and DPI, and used a condensed layout on only the screens in the smallest buckets. We rewrote the original layout flow to be more screen-size aware. The most dramatic UI optimization happened in the photo- and video-capture and editing flow. We gave Instagram on Android a beautifully flat makeover, trimmed unnecessary UI to give you more space to view photos and videos, and focused relentlessly on doing less in order to make the app faster. With these goals in mind, we rewrote every single screen in the app. Simplicity means less work for the phone’s hardware, hence a faster app. Drawing solid colors on the screen is faster and more memory efficient than loading and displaying gradients from image files on disk. Flat design is all about doing less - stripping away UI elements and letting the content speak for itself. Flat design looks great on phone screens, but there is an even more important reason why it has taken hold: performance. Android’s “Holo” theme, Windows Phone, and iOS7 all ditched complex gradients and shadows for solid colors and flat images. “Flat design” has taken hold in the mobile world over the past few years. We redesigned Instagram for Android six months ago with three main goals in mind: making the app faster, more beautiful, and more screen-size aware. We focused our work on Android on two key areas: design, and startup time. We shared details about this effort for the first time at this week’s conference. All this means that supporting Android users is both a technical challenge - and an opportunity for mobile developers who want to reach the entire world.Īt Instagram we’ve spent the last year reimagining and redesigning our Android app to work better for our users, no matter what phones they use or where they are located. Screen size is the most obvious variable - popular Android devices span from 240 x 320 to 1080 x 1920 pixels, a 27-fold difference in pixel count! In some emerging markets, users must also contend with unreliable mobile networks. People who use Android have an incredible amount of choice, with significant variations in speed, feature set, and cost. Building a better Instagram app for AndroidĪndroid is a huge ecosystem, with more than 1 billion active users spanning thousands of different device models.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |