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

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.

主站蜘蛛池模板: 自贡市| 化州市| 南川市| 炎陵县| 手游| 镇平县| 屯门区| 闻喜县| 江都市| 黄梅县| 正安县| 马尔康县| 新干县| 晴隆县| 无极县| 论坛| 保定市| 武邑县| 天柱县| 郁南县| 海丰县| 资溪县| 沛县| 资讯 | 元朗区| 秀山| 榆林市| 汶川县| 罗甸县| 自治县| 徐汇区| 晋城| 米脂县| 台中市| 崇州市| 威海市| 卓尼县| 兖州市| 张家港市| 贡山| 二连浩特市|