Android Global Strings

android

A global string, or array of strings are declared in an external xml file in the resource folder:<project>/res/values/strings.xml Declaring a global string Using a global string while creating a TextView XML example: Code example: Getting a global string Global String Array Declaration in a Global String Array Code usage Read More »

Android Layouts

android

Layout is a type of a GroupView. It holds views in a certain layout on the screen. Layouts can be declared in two ways: Declare UI elements in XML –Android provides a straightforward XML vocabulary that corresponds to the View classes and subclasses, such as those for widgets and layouts. Instantiate layout elements at runtime –your application can create View ... Read More »

Android View Groups

android

A ViewGroup is a special view that can contain other views. List view Spinner (drop-down list) Read More »

User Interface – Views

android

Creating and adding a new View to a LayoutXML example – Adding to a view in a layout XML file Code example – Creating and adding a new view to a Layout (implemented in an Activity class). Read More »

Android Fragment

android

A Fragment is a piece of an activity which enable more modular activity design. It will not be wrong if we say, a fragment is a kind of sub-activity. If you want to create multi-UI pane than you should use fragment . Fragment Overview * A fragment has its own layout and its own behaviour with its own life cycle ... Read More »

Android Content Providers

android

Content providers store and retrieve data and make it accessible to all applications. If you want to make your own data public, you have two options: You can create your own content provider (a ContentProvider subclass) or you can add the data to an existing provider. All Services must be declared in the manifest file. Content Provider Basics * All ... Read More »

Android Service

android

* A Service is an application which has the ability to run in the background without displaying any user interface.* A Service is a class which derives from android.app.Service.* All Services must be declared in the manifest file.* Services run without a dedicated GUI, but, like Activities and Broadcast Receivers, they still execute in the main thread of the application’s ... Read More »

Android Intent

android

Intent is the negotiator between two activities or between two applications. It gives the ability to pass messages and data between the two entities. When writing applications for mobile, Intent is very handy, since it gives access to a lot of the OS services like opening the camera, a browser, displaying notifications and so on. Intent Resolution Intents can be ... Read More »

Android View

android

A view is a single user interface element. Its responsibilities include drawing on a canvas and handling user events. Some Views can contain other Views, these are called view groups. A View is a class which derives from android.view.View. There are already many existing views. The developer can use them or create his own customized view by extending any of ... Read More »

Android Activity Lifecycle Concepts

android

Activity is the presenter of a single screen in the application. It is the only one who has certain abilities, like displaying Views, menus, alerts and notifications. It also has the ability to open a new Activity, which means opening a new screen. Activity is a class which derives from android.app.Activity. An application needs to have at least one Activity. ... Read More »