Chapter 3 – Android App Manifest

Android Manifest

Every application must have an AndroidManifest.xml file (with precisely that name) in its root directory. The manifest file provides essential information about your app to the Android system, which the system must have before it can run any of the app’s code. Among other things, the manifest file does the following: It names the Java […]

Chapter 2.8 – More Resource Types

More Resource Types

This page defines more types of resources you can externalize, including: Bool XML resource that carries a boolean value. Color XML resource that carries a color value (a hexadecimal color). Dimension XML resource that carries a dimension value (with a unit of measure). ID XML resource that provides a unique identifier for application resources and […]

Chapter 2.6 – String Resources

String Resource

A string resource provides text strings for your application with optional text styling and formatting. There are three types of resources that can provide your application with strings: String XML resource that provides a single string. String Array XML resource that provides an array of strings. Quantity Strings (Plurals) XML resource that carries different strings […]

Chapter 2.5 – Menu Resource

Menu Resources

A menu resource defines an application menu (Options Menu, Context Menu, or submenu) that can be inflated with MenuInflater. For a guide to using menus, see the Menus developer guide. FILE LOCATION: res/menu/filename.xml The filename will be used as the resource ID. COMPILED RESOURCE DATATYPE: Resource pointer to a Menu (or subclass) resource. RESOURCE REFERENCE: […]

Chapter 2.4 – Layout Resource

Layout Resources

A layout resource defines the architecture for the UI in an Activity or a component of a UI. FILE LOCATION: res/layout/filename.xml The filename will be used as the resource ID. COMPILED RESOURCE DATATYPE: Resource pointer to a View (or subclass) resource. RESOURCE REFERENCE: In Java: R.layout.filename In XML: @[package:]layout/filename SYNTAX: <?xml version=”1.0″ encoding=”utf-8″?> <ViewGroup ¬† […]

Chapter 2.3 – Drawable Resources

Drawable Resources

A drawable resource is a general concept for a graphic that can be drawn to the screen and which you can retrieve with APIs such as getDrawable(int) or apply to another XML resource with attributes such as android:drawable and android:icon. There are several different types of drawables: Bitmap File A bitmap graphic file (.png, .jpg, […]

Chapter 2.1 – Animation Resources

Android Animation Resource

An animation resource can define one of two types of animations: Property Animation Creates an animation by modifying an object’s property values over a set period of time with an¬†Animator. View Animation There are two types of animations that you can do with the view animation framework: Tween animation: Creates an animation by performing a […]

Android Buttons

Android Buttons

Android buttons consists of text or an icon (or both text and an icon) that communicates what action occurs when the user touches it. Depending on whether you want a button with text, an icon, or both, you can create the button in your layout in three ways: With text, using the Button class: <Button […]