LinearLayouts, TextViews and Drawables

I sent out a series of tweets today about LinearLayouts 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.

2 min read

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.

1 min read

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.

1 min read

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????!!!
~1 min read

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!

2 min read

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)).

1 min read

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
~1 min read

Pasting and Extracting Stuff

A lot of times, but especially when I am implementing some new logic, coding for me takes several steps:

  1. Write down what I have to do as comments
  2. Implement what I have written down
  3. Refactor and improve what I have implemented
1 min read

Stringy strings

While we are on the subject of strings, here are more ways of dealing with them in Android Studio. We all know that we should not hardcode strings in code, right? But sometimes, we forget and tend to do code first before defining them in strings.xml.

1 min read