We've been building our custom view, or many of them, in these last chapters. We've seen how to interact with them, how to draw 2D and 3D primitives, and we want somebody else to be able to use it. That is a great idea! It might be for ourselves, we might reuse it in a future project, or it might be a project by one of our colleagues. If we aim higher, it might be a project by the Android community.
One of the things that makes the Android community awesome is that there are lots of open source libraries. All these contributions by developers have helped many other developers get started in Android development, learn to get a deeper understanding of some concepts, or be able to build their applications in the first place.
Firstly, publishing your custom view or, for instance, an Android library, is one of the methods that contributes to this amazing community. Secondly, by doing so, it's a great way to advertise yourself, show the openness of your employer, and also attract talent to your company.
In this chapter, we'll see what we should take into consideration if we want to share our custom view and how to do it. We'll also put into practice some of the important recommendations we've given in the previous chapters. Even more importantly, we want other developers to use our custom view.
In more detail, we'll cover the following topics:
- Recommendations and best practices
- Publishing your custom view
Almost all recommendations given can be applied not only to custom views but to any Android library we'd like to share or we want to make reusable for our colleagues or other projects.