32
26 TH & 27 TH MARCH 2011@ KLS GIT, BELGAUM ANDROID WORKSHOP

Android Workshop

Embed Size (px)

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

Page 1: Android Workshop

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

ANDROID WORKSHOP

Page 2: Android Workshop

WHY TO CHOOSE MOBILES PLATFORM?

Page 3: Android Workshop

PLATFORMS AVAILABLE

•Android• IPhone•Blackberry•Windows7•Symbian OS

Page 4: Android Workshop

SHARES COMAPRISION

Page 5: Android Workshop

TYPES AND FEATURES

Page 6: Android Workshop

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.

Page 7: Android Workshop

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 ??

Page 8: Android Workshop
Page 9: Android Workshop

ADVANTAGES AND DISADVANTAGES

………….. Throughout the workshop.

Page 10: Android Workshop

INSTALLATION –TOOLS REQUIRED

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

Page 11: Android Workshop

EMULATOR CREATION

Page 12: Android Workshop

HELLO PROGRAM

Page 13: Android Workshop

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).

Page 14: Android Workshop
Page 15: Android Workshop

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.).

Page 16: Android Workshop

XML FOR GUI DESIGN

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

Page 17: Android Workshop

ANDROID MANIFEST FILE

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

Page 18: Android Workshop

UNDERSTANDING LAYOUTS

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

Page 19: Android Workshop

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.

Page 20: Android Workshop

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

Page 21: Android Workshop

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

Page 22: Android Workshop

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

Page 23: Android Workshop

ABSOULUTE LAYOUT

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

layout instead.

Page 24: Android Workshop

CODING FOR SOME SIMPLE WIDGETS

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

Page 25: Android Workshop

EXPLORING FEATURE OF VIEW

HOW TO USE

Page 26: Android Workshop

SOME IMPORTANT CONCEPTS

Page 27: Android Workshop

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.

Page 28: Android Workshop

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.

Page 29: Android Workshop

DATABASE DESIGNING FUNDAMENTALS

Page 30: Android Workshop

PREFERENCES CONTROL AND SETTING

Page 31: Android Workshop

SOME ADVANCE TOPIC

•Message sending•Push Notification

Page 32: Android Workshop

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