Android Tips: Making a Custom Button out of Anything
The Android APIs are filled with things that don’t quite seem right. I’ve always been annoyed by the lack of relationship between interface elements. For instance, isn’t a ListView really just a special case of a GridView with only one column? Yet GridView and ListView aren’t directly related, so we get oddities where I can add header and footer views to a ListView, but not a GridView.
One thing that seems to trip people up is the Button class.
Everyone Should Code
In the world we live in today, basic computer understanding is a must have. The folks at code.org have made this excellent video which really shows why everyone should learn to code and how easy it really can be.
{% youtube dU1xS07N-FA %}
The biggest question that I hear is “Where do I start?” and my answer is always the same, just start. You can spend years worrying about which language is best and what your first app is going to be, but none of that is really important in the long run.
The case for Fragment Callbacks
Fragment are a great addition to Android. They allow reusability of sections of your views at the controller layer, and they also provide better encapsulation of your app’s logic. This can really help developers speed up code development and also keep their code clean, which makes it easier to maintain. All of these benefits are available if you follow a few guidelines when developing your code.
One of the biggest mistakes that I see developers make, particularly those coming from other platforms, is casting the parent activity.