Refactoring Android Themes with Style: Theme Overlays

28 May 2020

This is part three of a series on refactoring themes and styles. Theme overlays are used to override values from your theme. At Monzo, we leverage theme overlays in different ways and this post highlights three cases where we’ve found using them to be helpful.

Read More

Refactoring Android Themes with Style: Restructuring Themes

30 April 2020

Last year, Nick Butcher and Chris Banes presented "Developing Themes with Style" at Droidcon Berlin. It was a welcome recap for themes and styles, as well as best practices for Android theming. We’ve been working to apply these best practices to the Android app at Monzo. For us, the challenge lay more in how we could make these changes safely, over time. In other words, how we can refactor our themes.

Read More

Resolving View Attributes on Android

28 October 2019

When a view is inflated from XML, where does Android look to determine the value of the view’s attributes? Let’s look at the places we can specify attributes and then go through an example with a custom view.

Read More

Using Material Theme Overlay

14 October 2019

The typical way to apply a theme overlay is using the `android:theme` attribute on our view. This post summarises how we can do this, as well as introducing `materialThemeOverlay`, a theme attribute that (kind of) lets us set a theme overlay on a default style.

Read More

Exposing Hidden Actions on Android

09 May 2019

Exposing “hidden” actions to accessibility services used to require providing a custom AccessibilityDelegate or using a third-party library like Novoda’s accessibilitools. No longer! There’s a new API dropping in the latest version of AppCompat (1.1.0) which includes a handy way to serve this information to the system with minimum effort.

Read More

art collector: learning about Android App Links

02 December 2018

Android App Links is a feature designed to reduce friction for users who want to access your content — instead of a user clicking an HTTP link and navigating to your website, Android will redirect them to the same content in your app, for a seamless transition to a native Android experience.

Read More

Starting a new project with Postman

27 August 2018

I started a new project the other day where I’ll be using the Harvard Art Museums API to build a small app that demonstrates usages of (or rather helps me learn) instant apps, app links and deep links. I’ve been using Postman for a while to explore and document REST APIs. I really like that it saves the requests we make, and that we can group them into collections.

Read More

TIL that you can use the Invoke Operator on Companion Objects too

12 August 2018

Kotlin lets us define custom behaviour for operators (e.g. +, ==or *). We can add mathematical or logical semantics for how operators behave with various types. We can either implement these behaviours in a class as a member function (handy for classes that we own), or externally, as an extension function (for types outside of our control).

Read More

TIL about Operator Overloading in Kotlin and the Invoke Operator

10 August 2018

Kotlin lets us define custom behaviour for operators (e.g. +, ==or *). We can add mathematical or logical semantics for how operators behave with various types. We can either implement these behaviours in a class as a member function (handy for classes that we own), or externally, as an extension function (for types outside of our control).

Read More

TIL: when is "when" exhaustive?

20 July 2018

Kotlin’s when works similarly to Java’s switch. Once upon a time, I heard that when forces you to specify all the branches (when all the branches can be known by the compiler, with enums or sealed-classes), but I didn’t find this to be the case.

Read More

Can TalkBack Read Me A Story?

29 March 2018

Someone asked me the other day how accessibility services behave if you use a single TextView with multiple spans, instead of multiple TextViews. I didn’t know, so I tried doing it.

Read More

Testing Views in Isolation

16 February 2018

I gave a presentation at MOBOS conference in Cluj-Napoca, Romania this week. It was based off some work I did last year, but have since added a lot of new features. The slides didn’t have any text, so here’s a summary of what I presented.

Read More