Understanding Android Naming Conventions

Recently I’ve spent time trying to answer questions from students and Stack Overflow users. I have found many questions about what to put in an Activity, how to get access to a Context when you need one, how to do some async thing on the UI thread, why use Fragments, etc. Each question is basically “how do I do this thing that Android makes difficult?”. Inevitably most answers by others provide hacky solutions that, while they technically work, should be ignored. These questions represent a fundamental misunderstanding about one or more class within the Android framework. The right answer to these questions is usually “you’re misunderstanding what this class is used for so you shouldn’t be doing this thing in the first place.” Continue reading “Understanding Android Naming Conventions”