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

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.

主站蜘蛛池模板: 郑州市| 孟连| 谢通门县| 西丰县| 芜湖市| 营口市| 阿克苏市| 双柏县| 湘潭县| 明光市| 石嘴山市| 吴旗县| 武城县| 太仆寺旗| 教育| 改则县| 新化县| 定南县| 内丘县| 雅安市| 图们市| 文山县| 呼和浩特市| 镇安县| 凤阳县| 石棉县| 白沙| 新泰市| 偃师市| 宁安市| 松滋市| 信宜市| 河池市| 乐山市| 邻水| 博白县| 射洪县| 郁南县| 宜兰市| 独山县| 贵州省|