Jason Robinson
Posted by Jason Robinson
October 6, 2015

How To Use RxJava As An Event Bus

RxJava has many uses, especially for applications requiring any amount of asynchronous operations. If you do not have experience with RxJava (or any of its sister implementations), I recommend checking it out and seeing if it can help improve your applications. I will not be covering the basics of RxJava in this blog, so a familiarity with the core concepts is recommended.

In this blog I will be covering how to create a simple bus implementation using RxJava in a pure Java application. This implementation can be ported to other Java-based platforms, such as Android. There are a few particulars I will cover before jumping into the implementation.

Read More
Jason Robinson
Posted by Jason Robinson
April 20, 2015

How to fix Ambiguous method call on getClass()" in Android Studio"

There is a bug in IntelliJ that will show an ambiguous method call error when using getClass() without an explicit cast. It looks like this:

Read More
Jason Robinson
Posted by Jason Robinson
March 3, 2015

Slim: Stop Writing and Rewriting Boilerplate Code

Slim is an annotation library whose main purpose is to remove common boilerplate associated with Android development. You can find it here on GitHub.

Read More
Jason Robinson
Posted by Jason Robinson
August 27, 2014

How to Import the Official Android Code Style

Importing the Official Android Code Style to Android Studio/IntelliJ

  1. Download AndroidStyle.xml from the Android platform_development repository.
    a. You might think you can just click the link above and Save As..., but you're wrong. Click the link, then choose the "Raw" display option.
  2. Save it to ~/Library/Preferences/AndroidStudioBeta/codestyles.
    Hidden files and folders will need to be visible to do this. To make hidden files and folders visible, follow the steps here: http://www.mikesel.info/show-hidden-files-mac-os-x-10-7-lion/
  3. Restart Android Studio
  4. Navigate to Android Studio > Preferences
  5. Navigate to Code Style > Java
  6. From the Scheme drop-down, select the name of the imported code style
  7. Click OK

! A note on column width:

The Android code style sets the column width to 100, which is very limiting. Change this by going to Code Style > General, and changing the "Right margin (columns)" field to 200.

Read More
Jason Robinson
Posted by Jason Robinson
August 26, 2014

Gradle

Why Gradle?

At Google I/O 2013, Google introduced Android Studio, and with that, a push for developers to adopt Gradle. Gradle is a build tool similar to Maven and Ant with one important distinction: I actually understand it. Gradle utilizes build files written in Groovy, which syntactically is very similar to Java. Compared to Maven, our build files are about three times smaller on average, and it's actually readable.

Read More
We use cookies to give you the best experience.