Android User Interface Fundamentals

All visual components in Android descend from the View class and are referred to generically as Views The ViewGroup class is an extension of View designed to contain multiple Views. View Groups are used most commonly to manage the layout of child Views, but they can also be used to create atomic reusable components. View … Read more

Fundamental Android UI Design

User interface (UI) design, user experience (UX), human computer interaction (HCI), and usability are huge topics that can’t be covered in the depth they deserve within the confines of this book. Nonetheless, the importance of creating a UI that your users will understand and enjoy using can’t be overstated Android introduces some new terminology for … Read more

Fundamental of Android UI Design

User interface (UI) design, user experience (UX), human computer interaction (HCI), and usability are huge topics that can’t be covered in the depth they deserve within the confines of this book. Nonetheless, the importance of creating a UI that your users will understand and enjoy using can’t be overstated. Android introduces some new terminology for … Read more

Android Activity Lifecycle

Android Activity Lifecycle

A good understanding of the Activity lifecycle is vital to ensure that your application provides a seamless user experience and properly manages its resources. Activity Stacks The state of each Activity is determined by its position on the Activity stack, a last-in–first-out collection of all the currently running Activities. When a new Activity starts, it … Read more

Android Activities

Each Activity represents a screen that an application can present to its users. The more complicated your application, the more screens you are likely to need Typically, this includes at least a primary interface screen that handles the main UI functionality of your application. This primary interface generally consists of a number of Fragments that … Read more

Overriding the Application Lifecycle Events in Android

The Application class provides event handlers for application creation and termination, low memory conditions, and configuration changes By overriding these methods, you can implement your own application-specific behavior for each of these circumstances: onCreate — Called when the application is created. Override this method to initialize your application singleton and create and initialize any application … Read more

Introduction of The Android Application Class in Android

Your application’s Application object remains instantiated whenever your application runs. Unlike Activities, the Application is not restarted as a result of configuration changes. Extending the Application class with your own implementation enables you to do three things: Respond to application level events broadcast by the Android run time such as low memory conditions Transfer objects … Read more

The Android Application Lifecycle

Unlike many traditional application platforms, Android applications have limited control over their own lifecycles. Instead, application components must listen for changes in the application state and react accordingly, taking particular care to be prepared for untimely termination By default, each Android application runs in its own process, each of which is running a separate instance … Read more

Runtime Configuration Changes in Android

Android handles runtime changes to the language, location, and hardware by terminating and restarting the active Activity. This forces the resource resolution for the Activity to be reevaluated and the most appropriate resource values for the new configuration to be selected In some special cases this default behavior may be inconvenient, particularly for applications that … Read more

Creating Resources for Different Languages and Hardware in Android

Using the directory structure described here, you can create different resource values for specific languages, locations, and hardware configurations. Android chooses from among these values dynamically at run time using its dynamic resource-selection mechanism. You can specify alternative resource values using a parallel directory structure within the res folder. A hyphen (-) is used to … Read more