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

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.

主站蜘蛛池模板: 岗巴县| 西城区| 浦东新区| 玉环县| 云南省| 哈尔滨市| 甘德县| 慈利县| 汕尾市| 河源市| 崇礼县| 社旗县| 伊吾县| 治多县| 酒泉市| 东城区| 托克托县| 布尔津县| 北票市| 富锦市| 潢川县| 海丰县| 万源市| 阜南县| 紫金县| 宁晋县| 藁城市| 连城县| 鄯善县| 达拉特旗| 丰宁| 元朗区| 西和县| 普陀区| 吕梁市| 齐齐哈尔市| 鹤峰县| 措勤县| 贵溪市| 甘肃省| 乡城县|