15
ANDROID TUTORIAL WAQAS AHME D [email protected]

Android tutorial

Embed Size (px)

Citation preview

Page 1: Android tutorial

ANDROID TUTO

RIAL

WAQAS AHMED

[email protected]

Page 2: Android tutorial

TOOLS1. Phone2. Eclipse ( http://www.eclipse.org/downloads/ ) Android Plugin (ADT)3. Android SDK (

http://developer.android.com/sdk/index.html )

4. JDK

Page 3: Android tutorial

ANDROID SDKOnce installed open the SDK ManagerInstall the desired packagesCreate an Android Virtual Device (AVD)

Page 4: Android tutorial

SDK MANAGER

Page 5: Android tutorial

AVD

Page 6: Android tutorial

ADT PLUGIN (1)In Eclipse, go to Help -> Install New SoftwareClick ‘Add’ in top rightEnter: Name: ADT Plugin Location: https://dl-ssl.google.com/android/eclipse/ Click OK, then select ‘Developer Tools’, click

NextClick Next and then FinishAfterwards, restart EclipseSpecify SDK location (next 3 slides) Must do this every time start a new project in a new location (at least in Windows)

Page 7: Android tutorial

ADT PLUGIN (2)

Page 8: Android tutorial

ADT PLUGIN (3)

Page 9: Android tutorial

ADT PLUGIN (4)

Page 10: Android tutorial

CREATING A PROJECT (1)

Page 11: Android tutorial

CREATING A PROJECT (2)

Need the items circled

ThenclickFinish

Page 12: Android tutorial

PROJECT COMPONENTS

src – your source codegen – auto-generated codeIncluded librariesResources Drawables (like .png images) LayoutsManifest file

Page 13: Android tutorial

LAYOUTS (1)Eclipse has a great UI creator Generates the XML for youComposed of View objectsCan be specified for portrait and landscape mode Use same file name, so can make completely different UIs for the

orientations without modifying any code

Page 14: Android tutorial

LAYOUTS (2)

Page 15: Android tutorial

ACTIVITIES (1)The basis of android applicationsA single Activity defines a single viewable screen the actions, not the layoutCan have multiple per applicationEach is a separate entityThey have a structured life cycle Different events in their life happen either via the user touching

buttons or programmatically