RxKotlin Multiple Observations

If you’ve been doing android development with RxJava or RxKotlin you know that it’s a steep learning curve. RxJava is a great skill that every android developer should have in their toolbox. It makes writing android apps much easier. I’m constantly learning new things with RxJava, and applying what I learn to my android applications. For example this last week …

Optional Parameters in Kotlin

Last week I gave a talk on Kotlin at the Austin Droids/GDG Meetup Hosted at Evernote. After the talk a question came up about mixing and matching Java with Kotlin. If you aren’t familiar Kotlin is 100% compatible with Java, allowing you to mix and match both in your project. In particular the question was How are optional parameters treated …

Avoiding Inheritance Hell With Kotlin

I’d like to thank Matt Wear and Kirill Rakhman for their feedback on this post. I’ve many times found myself working on a project where a Fragment or an Activity has been over inherited. For example I was working a project one time that had something like the following:

Smaller APKs with Classy Shark

A big thanks to my friend Enrique López Mañas for giving me feedback on how to improve this post, and of course Boris Farber for creating Classy Shark. App Size An app I am working on feels a lot larger than it should be, my hunch that this is due to dependencies that are being included in the APK that …

Exploring Tiles in Android N Preview Release

There are some cool new features slated for N(I’m voting that N stands for Nutella, cause this cake is amazing). In this post I will be covering my discoveries while using the new Tiles API. Note the online android developer docs don’t yet contain info about the new N APIs, but you can download the docs here for offline reading. …

Go With the Flow – Handling Configuration Changes with Flow

Last week we covered how to use flow with a master-detail view. I got some great feedback from Ray Ryan and Logan Johnson from the Square team. This week I’m going to be covering how to handle rotation. Crash on Rotation If you had tried rotating last weeks example you would have noticed a bug. Specifically when you rotate from …

Code Highlighting with Prism.JS

I have been using prismjs for a bit now. I like it. I noticed today though that it doesn’t color annotations in Java. My initial attempt at annotation coloring worked. Prism.languages.java = Prism.languages.extend(‘clike’, { ‘annotation’: /(@{1}\w*\(.*?\))|(@{1}\w+)/i, ‘keyword’: /\b(abstract|continue|for|new|switch|assert|default|goto…)\b/, ‘number’: /\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp\-]+\b|\b\d*\.?\d+(?:e[+-]?\d+)?[df]?\b/i, ‘operator’: { pattern: /(^|[^.])(?:\+[+=]?|-[-=]?|!=?|<<?=?|>>?>?=?|==?|&[&=]?|\|[|=]?|\*=?|\/=?|%=?|\^=?|[?:~])/m, lookbehind: true } }); Until but it failed to color annotations with parameters for some reason. …

Master Detail with Square’s Flow

Update I got some amazing feedback from Ray Rayan and Logan Johnson. I’ll likely be creating a supplemental post to cover their notes. One thing that should definitely go in this post is that Flow is in Alpha and the API isn’t stable. The api can change, so if you decide to use it and I hope you do 😉 …