Disassembled of. VC client for android and for the sake of interest went to the player markup. They used ImageView for all buttons. Why do so? After all, there is the ImageButton , ToggleButton .

Is it too lazy to do customization?

Closed due to the fact that it is necessary to reformulate the question so that it was possible to give an objectively correct answer by the participants user194374, Bald , VAndrJ , Denis Bubnov , Alex 1 Jan '17 at 7:09 .

The question gives rise to endless debates and discussions based not on knowledge, but on opinions. To get an answer, rephrase your question so that it can be given an unambiguously correct answer, or delete the question altogether. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • I myself did not use the VK client, but perhaps their controls do not need visualization of touch events or even this “button” background, then ImageView more appropriate to use than the ImageButton , fewer movements - pavlofff

2 answers 2

By definition:

 public class ImageButton extends ImageView {...} 

In fact, the ImageButton differs from the ImageView only in the presence of its predefined style, which in some of its guises seems to emulate the effect of pressing. Not everyone likes it, especially now in an era when flat design has become a trend.

Well, there is one more circumstance: when you take a parent class, you get a little more control over the object's behavior (in exchange for the amount of code, of course). Some progers think it is ice.

    There is such a term as ПРИ́ХОТЬ that matters: Moody desire, whim.

    Programmers they often write porridge a place of small code. Often faced with this, they strongly twist everything and so on ... I saw the markup where TextView made invisible and stored passwords in it)))))))))