Android Workshop

Preview:

DESCRIPTION

Here is the presentation used at the Android Workshop conducted at KLS GIT Belgaum, on 26th & 27th March 2011.For more resources visit us at http://blog.dotcord.com

Citation preview

26TH & 27TH MARCH 2011@ KLS GIT, BELGAUM

ANDROID WORKSHOP

WHY TO CHOOSE MOBILES PLATFORM?

PLATFORMS AVAILABLE

•Android• IPhone•Blackberry•Windows7•Symbian OS

SHARES COMAPRISION

TYPES AND FEATURES

WHY ANDROID?

• Android is open and available for all platform.• Android scales to every device.• It’s Supported by Dozens of Hardware

Manufacturers.• Third Party Development is Encouraged.

WHAT IS ANDROID?

• Android is an open-source software stack for mobile devices that includes an operating system, middleware and key applications.

What it means ??

ADVANTAGES AND DISADVANTAGES

………….. Throughout the workshop.

INSTALLATION –TOOLS REQUIRED

•Any OS•Eclipse Galileo (or higher)•ADT Pluggin•Any android device (good to have one)

EMULATOR CREATION

HELLO PROGRAM

ACTIVITY??

• An activity is a single, focused thing that the user can do.• Almost all activities interact with the user, so the

Activity class takes care of creating a window for you in which you can place your UI with setContentView(View).

WHAT IS VIEW??

• This class represents the basic building block for user interface components.• A View occupies a rectangular area on the screen

and is responsible for drawing and event handling.• View is the base class for widgets, which are used

to create interactive UI components (buttons, text fields, etc.).

XML FOR GUI DESIGN

• Why XML?• Java code or XML.• Controlling portrait or landscape.• Language control.

ANDROID MANIFEST FILE

• What ??• Why ??• How to use .

UNDERSTANDING LAYOUTS

•Linear Layout.•Relative Layout.•Frame Layout.•Table Layout.•Absolute Layout.

LINEAR LAYOUT

• A Layout that arranges its children in a single column or a single row.• The direction of the row can be set by calling

setOrientation().• You can also specify gravity, by calling

setGravity() or specify weight member of LinearLayout.LayoutParams.• The default orientation is horizontal.

RELATIVE LAYOUT

• A Layout where the positions of the children can be described in relation to each other or to the parent.• Note:that you cannot have a circular dependency

between the size of the RelativeLayout and the position of its children.• Relative Layout Example

FRAME LAYOUT

• FrameLayout is designed to block out an area on the screen to display a single item.

• You can add multiple children to a FrameLayout and control their position within the FrameLayout using gravity.

• Children are drawn in a stack, with the most recently added child on top.

• The size of the frame layout is the size of its largest child (plus padding), visible or not (if the FrameLayout's parent permits).

• Views that are GONE are used for sizing only if setConsiderGoneChildrenWhenMeasuring() is set to true.

• Frame Layout Xml• Frame Layout java

TABLE LAYOUT

• A layout that arranges its children into rows and columns.

• A TableLayout consists of a number of TableRow objects, each defining a row (actually, you can have other children, which will be explained below).

• TableLayout containers do not display border lines for their rows, columns, or cells.

• Each row has zero or more cells; each cell can hold one View object.

• The table has as many columns as the row with the most cells.

• A table can leave cells empty. Cells can span columns, as they can in HTML.

• Table Layout Example

ABSOULUTE LAYOUT

• This class is deprecated.• Use FrameLayout, RelativeLayout or a custom

layout instead.

CODING FOR SOME SIMPLE WIDGETS

• Text View• Button• Edit Text• Checkbox• Radio Button• Spinner• List view• Progress Bar

EXPLORING FEATURE OF VIEW

HOW TO USE

SOME IMPORTANT CONCEPTS

BUNDLE

• A mapping from String values to various Parcelable types.

• How and where it is used

Bundle Demo & Example of Moving from one activity to another activity.

CURSOR

• This interface provides random read-write access to the result set returned by a database query.• Cursor implementations are not required to be

synchronized so code using a Cursor from multiple threads should perform its own synchronization when using the Cursor.

DATABASE DESIGNING FUNDAMENTALS

PREFERENCES CONTROL AND SETTING

SOME ADVANCE TOPIC

•Message sending•Push Notification

RESOURCES

• All about android• Sample Code• Our God – Google

Stay tuned with us @

Blog: http://blog.dotcord.comFacebook: http://facebook.com/dotcord

Twitter: http://twitter.com/dotcord