- Building Android UIs with Custom Views
- Raimon Ràfols Montané
- 383字
- 2021-07-02 15:33:35
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.
- 程序員修煉之道:程序設計入門30講
- 高手是如何做產品設計的(全2冊)
- Vue.js快速入門與深入實戰
- PostgreSQL 11從入門到精通(視頻教學版)
- Full-Stack Vue.js 2 and Laravel 5
- SharePoint Development with the SharePoint Framework
- Go并發編程實戰
- The DevOps 2.5 Toolkit
- Visual Basic程序設計實踐教程
- Spring技術內幕:深入解析Spring架構與設計原理(第2版)
- Learning Python Data Visualization
- Qt 4開發實踐
- 企業級Java現代化:寫給開發者的云原生簡明指南
- Pandas 1.x Cookbook
- Mastering Python