Two years ago, a coworker wrote a Spin post on Seven JetBrains shortcuts. Once you get used to using them and combining them, they significantly improve workflow. So here are a few more I find useful, plus how you can use them together. More JetBrains Shortcuts Duplicate with ⌘D ⌘D is useful when you have […]
When working with RecyclerView, our choices are limited to linear, grid, and staggered grid (unless you’re creating a custom layout manager). But what if we want something that works like a grid layout, but allows us to center rows or justify them as we like? That’s where a flexbox would work well. And it just […]
It would be nice if creating a SearchView with suggestions were as simple as giving the SearchView a list of strings. But unfortunately, that’s not the case. It requires a CursorAdapter. This tells the SearchView how to render the suggestions and keeps track of the selection and what’s visible.
For the past two years, I’ve attended a little-known convention called Gen Con. Okay, depending on who you ask, it might not be that little-known. It draws over 60,000 unique attendees (over 200k visits throughout four days). Besides spending time enjoying everything at the convention—from visiting exhibitor booths to making purchases, trying out new games, […]
When writing tests for a Node.js server, it’s common to test the database as well. (At least, one hopes.) Here are a few helper functions for testing a PostgreSQL database using Knex.
When working on an app in Kotlin or Android, it’s very common to use RecyclerViews to display lists of information. Typically, this data will be built up in ViewModels and passed to a list adapter. This works fine for most things and allows interaction with the items. Usually, they don’t need to change directly in […]
When building a Kotlin app, or any app for that matter, it’s pretty inevitable that it will contain push notifications. And with push notifications, it’s likely the app icon will need a badge. This is possible with the standard Android API, but unfortunately, the target SDK needs to be 26 or higher for it to […]
Android’s TimePickerDialog is fairly simple to use and works well if all you need to do is to choose hours and minutes. The problem is that you can’t restrict which times can be selected, set time intervals, allow seconds to be chosen, or style it in a meaningful way. The MaterialDateTimePicker library was made to […]
A “picker” is a small scrollable list of defined values that looks like a combination lock with dials. It’s native to Swift. I think “spinner” would be a better name, because it looks like it spins. (Android has a “spinner,” but it’s really just a drop-down list. Annoying.) In this post, I will be showing […]
JSON Server is an easy and quick-to-set-up module that you can use to fake or mock an API. You can find the basics in the documentation, and many articles regurgitate the same info. In this post, though, I intend to cover a few of the more complex things you can do with JSON Server.