Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Activity base class?

Tags:

android

What is Activity base class: java.lang.Object or android.content.Context?

The class overview is not clear to me (see the image please).

like image 456
sandalone Avatar asked Dec 09 '22 07:12

sandalone


2 Answers

In Java every class has an Object as a superclass (You can also have more information here). Context is a Java class hence it has Object at the root of its inheritance tree hierarchy. Context is a class that holds information about an application environment as described in the official documentation, and Activity has it in its inheritance tree.

like image 164
Amokrane Chentir Avatar answered Dec 31 '22 11:12

Amokrane Chentir


Context is the base class for Activity.

like image 41
Sanal Varghese Avatar answered Dec 31 '22 12:12

Sanal Varghese