Monthly Archives: July 2013

Example of custom states in Android components

A while ago, I built a form based app with lots of input fields and all the things that come with that, like validation and error messages. In one of the situations, if a section is invalid, the field labels should turn red. Easy right? Here’s the example layout: And a naive way to switch the label colors when there’s an error: But this is kinda ugly. We need to get “not-error” color from each …

Continue reading →

Gradle vs Maven

For some reason, now that Android is moving to a Gradle based build system, there’s some discussion whether Maven is better than Gradle or vice versa. There’s what I like most from Gradle compared to Maven: 1. Fast builds. Run a build twice: 2nd time you’ll see only “UP-TO-DATE” if nothing changed. 2. Dependencies choice: Artifacts in a maven repo? Have a library as a jar in your project? No problem, you can mix and …

Continue reading →