In which I was in a podcast
It has been a month since IO and in case you missed it, I got to chat with Kaushik of Fragmented. And by golly, I made it into an episode! At that point I was about to lose my voice, so I sound really husky. :p
More Watches Love and a note on Context
I have previously written about debugging and how Watches can help make inspecting things in your code easier. Today, I would like to reiterate how powerful Watches can be.
Taking a closer look while debugging
One of the most common sources of bugs (at least of my bugs) is math. I have been working on dynamically resizing a View the past days, and it was driving me nuts! I needed to consider preserving aspect ratio, device density, original view size, etc etc. Math is hard guys!
LinearLayouts, TextViews and Drawables
I sent out a series of tweets today about LinearLayout
s and unexpectedly, quite a few people like them. I decided to get off my lazy ass and actually write it down in a post for easy reference.
Squashing Bugs
This has been one hell of a busy week for me. I think you can sort of tell from my Tweets and G+ posts that I have been debugging A LOT.
Annotating all (or most of) the things
If, like me, you are old and have been developing for Android for a while, you should, like me, appreciate the fact that the backwards compatibility of the OS has come a long way. Sure, they may toy with my feelings from time to time, but we all need a little excitement every now and then.
NOT another day at the office
We had another round of Innovation Day at Domain last month, and I wrote about it. We started out dreaming up this ambitious project – too ambitious for two days! Here’s a partial list of what we had to do:
- Build a wall
- Stick devices on said wall
- Make app that cycles through photos from listings
- Load said app on those devices that we stuck to the wall
- Figure out how to track people who get devices
- What if someone just gets a device?!
- Figure out how to let people give back devices
- Oh! oh! oh! Wouldn’t it be cool if other devices cheer when one of them “comes home”?
- How do we put new versions of the app on those devices?
- Run tests, maybe?
- What if the website team wants to test responsive designs?
- Do they even charge????!!!
In Which Things Got Cheesy
Today, Android Developers published Domain’s Developer Story. In it, Gary and Rique talked about how the Domain Android app was rated very poorly and had all sorts of problems. Fast forward two years and it is now a highly-rated, top-ranked lifestyle app in Australia. You would think that going from a 2.8 star rating to 4.1 stars is all sorts of amazing. And it is!
Raising Activities From the Dead
One of the scenarios I admittedly ~almost~ always forget to test is “What happens when my app goes into the background, then the OS kills is to claim memory, then I try to resume?” Usually it’s “Well, I handle onSavedInstanceState
not being null
, so I am great!” It is fine and dandy for simple apps; but once your Activity
or Fragment
gets beefier and you start relying on state for more and more things, it can get complicated pretty quickly (In my case, the Fragment
has setRetainInstance(true)
).
Lies I’ve been told today
So I played around with data binding today. And these are the lies that the dev guide told me (explicitly or inferred):
- There is a method `DataBindingUtil.bindTo(viewRoot, layoutId)
- That this will work
MyLayoutBinding.bind(viewRoot);
- Android Studio has auto-complete