Skip to main content

Posts

Showing posts with the label lifecycle

Interview Question 21 - 30

See more basics on Android along with interview questions Explain about the Android Exceptions ? The following are the exceptions that are supported by Android InflateException :         When an error conditions are occurred, this exception is thrown Surface.OutOfResourceException:         When a surface is not created or resized, this exception is thrown SurfaceHolder.BadSurfaceTypeException:          This exception is thrown from the lockCanvas() method, when invoked on a Surface whose is SURFACE_TYPE_PUSH_BUFFERS WindowManager.BadTokenException:          This exception is thrown at the time of trying to add view an invalid WindowManager.LayoutParamstoken. What is Drawable? A compiled visual resource that can be used as a background, title, or other part of the screen. It is compiled into an android.graphics.drawable subclass. What is an Intent Receiver? An a...

Activity Life Cycle of Android

An activity is usually a single screen that the user sees on the device at one time. An application typically has multiple activities, and the user flips back and forth among them. As such, activities are the most visible part of your application.Activity Manager is responsible for creating, destroying, and managing activities. For example, when the user starts an application for the first time, the Activity Manager will create its activity and put it onto the screen. Later, when the user switches screens, the Activity Manager will move that previous activity to a holding place. This way, if the user wants to go back to an older activity, it can be started more quickly. Older activities that the user hasn’t used in a while will be destroyed in order to free more space for the currently active one. This mechanism is designed to help improve the speed of the user interface and thus improve the overall user experience. An Activity in Android can exist in four states as d...