Why are lifecycle methods in activity class defined with protected access specifier
Why are the lifeCycle methods in android have access specifiers as protected ? what i understand about Access-specifiers is as below :: But why should we need to make all the life-cycle methods as protected I notice this when i override the lifecycle methods I know over-riding the methods of Activity class as methods in Activity class are defined protected But why are they defined as protected Sam They are protected for encapsulation within the framework package android.app and subclasses. They are to be called by android.app.ActivityManager (same package) only. Depending on the method