• Adding Firebase to an Android Project

    Considering the vast array of features included in Firebase, adding it to your project is surprisingly easy. Later versions of Android Studio even include an assistant that analyses the current project and provides fixes for common integration mistakes.

  • Creating A New Firebase Project

    The first step towards integrating any of the 25+ features included in Firebase is creating a new Firebase project. The same project can be used across for multiple apps, but only one per platform. For example, a web app, Android app, and iOS app can all use the same project. This post is part of the Firebase tutorial series.

  • Recolouring / modifying multi-layer drawables dynamically in Android

    Often when creating interfaces in Android, it can be more efficient to have a single .xml drawable and recolouring it according to requirements, instead of trying to include all possible colours in advance. Similarly, it can be more efficient to replace the drawable used inside another drawable dynamically. However, if this needs to be done multiple times within one drawable it becomes a bit more complex, as any modifications will affect the entire drawable.

  • Using multi-weighted custom fonts on Android

    Many apps can use the default Android font, Roboto. However, often clients will have a branded font that must be used that is not included in Android. Luckily, XML fonts (API 16+) solve this issue very neatly. However, these fonts can only be bold, or not bold, yet many fonts have semibold / semilight variants that need to be supported.

  • Dynamically preventing scrolling on selected ViewPager pages

    ViewPagers are an extremely powerful UI tool that by default can be swiped left and right freely. In some cases however, it can be useful to prevent the user swiping in certain directions on certain pages, i.e. a “LockableViewPager”. For example, the first 2 pages might have to be passed programmatically, and then all other pages can be navigated between freely.

  • Loco 3: Exporting strings

    Loco is a translation management tool with a staggering array of features, and a very reasonable free plan. This series of guides will cover the basics of using Loco, continuing with Part 3: Exporting strings in a variety of formats.

  • Loco 2: Collaborating with others

    Loco is a translation management tool with a staggering array of features, and a very reasonable free plan. This series of guides will cover the basics of using Loco, continuing with Part 2: Collaborating with others, covering comments, roles, and change history.

  • Loco 1: String management for multi-platform & multi-locale projects

    Loco is a translation management tool with a staggering array of features, and a very reasonable free plan. This series of guides will cover the basics of using Loco, starting with Part 1: Creating a project and adding strings.

  • Generic SharedPreferences Utility Class

    Recently, a project required both backed up and non-backed up SharedPreferences, as well as an easy way to read and write these values. The following class was created with this functionality, using generics in Kotlin for practice. This post will walkthrough some of the key features, the finished code is also available as a Gist.

  • Creating a custom Android ActionBar

    By default, new Android projects have an ActionBar at the top (also known as a title bar), which usually contains a title, an optional back button on the left, and optional action(s) on the right. For many cases, minor customisations to colour are enough, but if a project requires exactly meeting a client’s design more advanced functionality will need to be utilised.