A
A
Anton Dean2015-06-24 14:43:26
Android
Anton Dean, 2015-06-24 14:43:26

How to implement Custom View with Canvas in Android?

I noticed that in some applications on Android, the ItemView is solid. That is, it is drawn anew, using Canvas, and not through markup in Layout XML, or programmatically.
For example, Gmail - https://pp.vk.me/c621823/v621823970/29b7d/NiughYqU... and VKontakte - https://pp.vk.me/c621823/v621823970/29b69/ftEJgy3-...
Most likely this is done for optimization, the list appears faster, and then immediately the question is:
How much does this speed up the application? Is it necessary to optimize overloaded Views in this way?
If you need to optimize overloaded Views in this way, where to start? Are there any guides? In addition to the official Android, I already looked there.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Emin, 2015-06-24
@Ewintory

Custom views tech talk

A
anyd3v, 2015-06-24
@anyd3v

This is a set of Views and not one View with canvas rendering.
In any case, all controls are drawn on the canvas, if you can draw an analog on the canvas faster than the standard component does, then how much faster you can do it, then you will get a profit. Hand on heart, I doubt it very much.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question