202106 Jul

Minimalist programming, Android edition – Dmitry Brant

Summary

These days we don’t bat an eye at these kinds of numbers, and indeed this size is pretty modest in the grand scheme of today’s software ecosystem. (Although I’ll repeat that if we use , then Kotlin would pretty much be optimized away, so this is more of an observation than a “tax.”) After converting the code to plain Java and rebuilding the app, our APK is now 2.7 MB: That’s a little better! Getting rid of AndroidX means that our app will rely solely on the SDK libraries that are part of the operating system on the user’s device itself. By default Android Studio generates a launcher icon for our app that takes several forms: a mipmap resource, which is a series of PNG files at different scales, which will be chosen by the launcher to match the pixel density and resolution of the device, and also a vector resource that will be used instead of the mipmap on newer devices (Android 8 and higher). It may be possible to squeeze it down even further, but that would necessitate doing even more hacky and inconvenient things, such as removing all XML resources and creating layouts programmatically in our code.

Source: Dmitrybrant

Classifications

Companies