Jul 25, 2016

Effective Java #9

As Java (or Android) developers, we use Object all the time. Java is an object-oriented programming language in the first place. We probably read/hear (more than once1 2 3) that equals() and hashCode() should only be overriden together, as they affect hashtable operations. Let’s do an interactive experiment to see what happens when one doesn’t follow advice.

Read on  

  Jun 17, 2016

Bottom sheet everything

No, sorry that is just a catchy title. We of course should not bottom sheet1 everything. But using it in the right context can greatly improve user experience. In this article, I will share my experience applying bottom sheet in my Android application, Materialistic:

  • to deep link to a screen within the application
  • to display a richer, more visual options menu
  1. Bottom sheets - Google design guidelines

Read on  

  May 19, 2016

Hacking up an ad blocker for Android

I was shuffling to catch up with news waiting for Google I/O 2016 to start (which was 1AM my timezone), while an idea just popped up: let’s build an ad blocker to browse news in my phone without the unwanted distraction!

Read on  

  Feb 27, 2016

Rich text battle: TextView vs WebView

So, say we have a piece of rich text, most probably in the form of HTML (e.g. a simplified HTML made for mobile reading), what kind of widget is best used to display it? How do we achieve the flexible yet rich reading experience from popular mobile readers like Readability, Pocket, or Materialistic (!)?

In this article, we will explore two very popular and powerful widgets that has been available since API 1: TextView and WebView, for the purpose of rich text rendering. The article does not aim to provide a comprehensive comparison, but rather touches on several critical desicion making points.

Read on  

  Nov 30, 2015

Building custom preferences with preference-v7

* This article is meant for advanced UI customization of preferences. For basics, check out Android API guide1.

Settings2 or preferences are one of those semi-essential components that make our app feel more personal to users, by giving them choices to tailor their own experience. Preferences are especially popular in apps for ‘power’ users, where they are presented with a bloat of settings. They are also important in apps where users are opinionated in terms of what makes great experience, e.g. reading apps. Yet building a great settings section in Android has always been a source of pain, at least until recently.

Read on