官术网_书友最值得收藏!

The need for custom views

There are lovely Android applications on Google Play and in other markets: Amazon, built only using the standard Android UI widgets and layouts. There are also many other applications that have that small additional feature that makes our interaction with them easier or simply more pleasing. There is no magic formula, but maybe by just adding something different, something that the user feels like "hey it's not just another app for..." might increase our user retention. It might not be the deal breaker, but it can definitely make the difference sometimes.

Some custom views can cause so much impact that can cause other applications wanting to imitate it or to build something similar. This effect produces a viral marketing of the application and it also gets the developer community involved as many similar components might appear in the form of tutorials or open source libraries. Obviously, this effect only lasts a limited period of time, but if that happens it's definitely worth it for your application as it'll get more popular and well-known between developers because it'll be something special, not just another Android application.

One of the main reasons to create our own custom views for our mobile application is, precisely, to have something special. It might be a menu, a component, a screen, something that might be really needed or even the main functionality for our application or just as an additional feature.

In addition, by creating our custom view we can actually optimize the performance of our application. We can create a specific way of laying out widgets that otherwise will need many hierarchy layers by just using standard Android layouts or a custom view that simplifies rendering or user interaction.

On the other hand, we can easily fall in the error of trying to custom build everything. Android provides an awesome list of widget and layout components that manages a lot of things for ourselves. If we ignore the basic Android framework and try to build everything by ourselves it would be a lot of work. We would potentially struggle with a lot of issues and errors that the Android OS developers already faced or, at least, very similar ones and, to put it up in one sentence, we would be reinventing the wheel.

主站蜘蛛池模板: 凌源市| 诸城市| 蓝田县| 安阳市| 永兴县| 安阳市| 南京市| 尚志市| 芜湖市| 界首市| 西充县| 宜川县| 西充县| 修武县| 宜昌市| 邛崃市| 五华县| 彩票| 武山县| 同德县| 望谟县| 衡东县| 页游| 罗定市| 亳州市| 蓝田县| 上饶市| 三原县| 通榆县| 息烽县| 桂阳县| 景德镇市| 惠州市| 富裕县| 澄江县| 汶川县| 温泉县| 常州市| 咸宁市| 鄯善县| 曲阳县|