Thursday, May 16, 2013

Google IO Day One - Keynote



Google IO kicked off yesterday with the keynote at the Moscone Center in San Francisco. They keynote is always an exciting event with the big names on center stage filling your ears with all the great new and upcoming tech. While this years keynote steered away from hardware and Key-lime Pie it was till jam packed with a tonne of stuff. Here are the bits of the Keynote that I found interesting:


Android Studio

This took me as a bit of a surprise to be honest and quite a good surprise at that. Google is moving from Eclipse to IntelliJ. This is very interesting because b2cloud has just made this transition about two months ago after struggling with Juno for months. With the Android tools team putting it's resources behind intelliJ for Android, some of the weaker aspects to IntelliJ have been improved, namely the Visual Editor. Prior to Google's input the visual editor bordered on horrible to unusual, now it has the multi-screen size comparison Eclipse has.


Galaxy S4 Nexus Edition

I had heard rumors about a Galaxy S4 Nexus Edition prior to the keynote starting, but I was a bit skeptical. Sure enough though, the announcement came. This is very interesting and promising, basically it's opening up the doors for any manufacturer to step up to the plate, put Vanilla Android on their flagship phone and submit it as a Nexus Edition to be purchased on Google Play. I'm hoping the HTC One will follow suite! Come on HTC, the Android community has been waiting for another HTC Nexus devices for a long time!


Translation Services

Google has now integrated translation services into Google Play. This is a paid feature that has string resources submitted to a human or humans who then go through them and translate them. In the keynote they said the turn around was a week.


Beta Testing and Staged Rollouts

The developer console is now letting you manage your beta testing by giving you the ability to setup a beta testing team who will get access to your app. It also allows the user to do a staged rollout of updates by selecting the percentage of users you want to include in the rollout. Staged rollouts are a great way of minimizing the potential impact of a accidental bad release. While as developers we try to ensure that this doesn't occur, sometimes bugs occur and sometimes they occur with disastrous impact. 


Google Music - All Access

Google has entered the music streaming wars, with a fresh new music app, and a $9.99 a month subscription rate ($7.99 if you get in early). I don't think most people will find this interesting as Spotify, MOG and Pandora has a large hold on this market. For me however this is great as I already have a large number of songs uploaded and purchased from Google Music. Unfortunately this service is for the US only, however if you work a bit of Google Plus magic you might be able to access this from other countries, hint hint!

There's much more in the keynote that I wanted to add but these are the big topics that interested me the most. I strongly recommend watching the keynote yourself on youTube

Saturday, March 23, 2013

9-patch Transparency Gotcha

This is from a post I put up at b2cloud

Recently I had a project design which required borders around each image displayed. To avoid overdraw I used a 9-patch image resource with a transparent center in which the image would be placed. This would theoretically avoiding overdraw completely. So after a quick session in Photoshop I knocked a 9-patch, turned on “Show Overdraw” on my Dev phone and did a test run.


Not quite the results I was hoping for! If you look very carefully, you will notice that while almost everything is blue (good), there is a thin border of green around each image which signifies overdraw. The obvious place the overdraw could have come from is the content patches along to the bottom and right hand side. If they happened to be too long and overlapped the border then overdrawing would occur. A quick examination of the resource proved that was not the issue, the content images were correct.


Given that the content patches were correct, that only left the stretch patches. That raised the question, What if the stretch patches not only told Android where to stretch the image, but also told it where to stop drawing due to transparency. With that question in mind, I set out to test the theory.


After extending the stretch patches across the entire transparency section I fired up the app once again.


Success!

There you have it, if you’re going to use transparency in 9-patch resources to reduce overdraw be sure that your stretch patches encompass the whole transparent area.

If your interested on more tips for UI performance check out Romain Guys post at curious-creature.org