• Preview image of Using multi-weighted custom fonts on Android

    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.

  • Preview image of Dynamically preventing scrolling on selected ViewPager pages

    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.

  • Preview image of Loco 3: Exporting strings

    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.

  • Preview image of Loco 2: Collaborating with others

    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.

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

    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.

  • Preview image of Generic SharedPreferences Utility Class

    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.

  • Preview image of Creating a custom Android ActionBar

    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.

  • Preview image of Getting OneSignal Working On A Multi-Module Project

    Getting OneSignal Working On A Multi-Module Project

    Recently, upon attempting to implement OneSignal for user notifications (and following their installation instructions), a wide variety of intriguing and mysterious build errors were encountered.

  • Preview image of Getting Started with Sugar ORM

    Getting Started with Sugar ORM

    Sugar is a very easy to use ORM library used to make handling databases on Android hassle-free. Whilst it lacks some features, it is ideally suited to smaller projects due to the simple syntax.

  • Preview image of Auto-detecting Device Orientation Whilst Allowing User to Override

    Auto-detecting Device Orientation Whilst Allowing User to Override

    When creating games (and other apps), screen orientation is very important. In general, more casual games use portrait, whilst more hardcore / intense games use landscape. However, some games may be inbetween these two categories, or may wish to reach a wider audience by supporting both. Automatically rotating to match device orientation is easy, but allowing the user to “lock” one orientation is a little trickier.