In general, the question is. As you know, if class B is inherited from class A, then class B will have access to all methods from class A, (except for the case with private). In other languages everywhere. And why in Android, inheritance is somehow differently understood. That is, if class B is inherited from class A, and class A is started at the beginning of the program, then if we turn from class A to class B, then class B will do the same as class A. That is, it will also start and do everything that It was written in class A. It's wrong. With inheritance, it only becomes possible to use methods from the inherited class. And here it turns out that Class B identically performs everything that is written in class A.
In Class A, a code is written that displays a picture, Class B, it turns out, it also starts to display a picture when it starts up.
Here is the CODE http://ideone.com/10A8K8