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.
A year ago, on July 25, 2017, my partner passed away very unexpectedly. This experience gave me some insights on how, as coworkers, we can help each other deal with grief.
The crossing numbers of graphs is an interesting topic in discrete geometry, graph theory, graph drawing, and computer science. Though simple at its core, it lends itself to ideas that are much more complex.