Matthew Dolan
1 min readJan 23, 2019

--

Originally I had the swatches generating as part of the build, and doing this really should be the recommendation — slower build, but faster app.

In the end I preferred storing the data in a database for easier querying. Android doesn’t lend itself to embedding read-only databases without having to copy them to disk, well there is a way using the native libsql but then you’re having to manage native code too, so it just seemed easier to create the DB on the fly.

Part of my motivation for doing it on the fly was, over-engineering now, but with the thought that in the future the images would come from a server to be dynamically updated.

--

--

Matthew Dolan

Matt Dolan has been eating doughnuts and developing with Android since the dark days of v1.6.