20
First Venture into the Android World Chapter 1 Part 2

First Venture into the Android World

  • Upload
    scot

  • View
    44

  • Download
    0

Embed Size (px)

DESCRIPTION

First Venture into the Android World. Chapter 1 Part 2. Creating a New Project. To create a new Android project, you first open Eclipse and then select an Android project. As you create your first project, you provide the following information. (Next Slide). Creating the Hello World Project. - PowerPoint PPT Presentation

Citation preview

Page 1: First Venture into the Android World

First Venture into the Android World

Chapter 1 Part 2

Page 2: First Venture into the Android World

Creating a New Project

To create a new Android project, you first open Eclipse and then select an Android project. As you create your first project, you provide the following information. (Next Slide)

Page 3: First Venture into the Android World

Creating the Hello World ProjectProject – a single program or app using Java and the Android SDK.

Open the new dialog box by click new icon

New button

Android Application Project

Page 4: First Venture into the Android World

Click the Next Button

Next Button

Page 5: First Venture into the Android World

New Application Dialog Box

Page 6: First Venture into the Android World

Application Name is the app name that appears to users. For this project, use "My First App."Project Name is the name of your project directory and the name visible in Eclipse.Package Name is the package namespace for your app (following the same rules as packages in the Java programming language). Your package name must be unique across all packages installed on the Android system. For this reason, it's generally best if you use a name that begins with the reverse domain name of your organization or publisher entity. For this project, you can use something like "com.example.myfirstapp." However, you cannot publish your app on Google Play using the "com.example" namespace.Build SDK is the platform version against which you will compile your app. By default, this is set to the latest version of Android available in your SDK. (It should be Android 4.1 or greater; if you don't have such a version available, you must install one using the SDK Manager). You can still build your app to support older versions, but setting the build target to the latest version allows you to enable new features and optimize your app for a great user experience on the latest devices.Minimum Required SDK is the lowest version of Android that your app supports. To support as many devices as possible, you should set this to the lowest version available that allows your app to provide its core feature set. If any feature of your app is possible only on newer versions of Android and it's not critical to the app's core feature set, you can enable the feature only when running on the versions that support it.

Page 7: First Venture into the Android World

Building the User InterfaceAndroid supports two ways to build Apps.

JavaXML

Page 8: First Venture into the Android World

Configure Launcher IconThis will allow you to put the image in of the icon for the App

Page 9: First Venture into the Android World
Page 10: First Venture into the Android World
Page 11: First Venture into the Android World

Package Explorer

Expand Hello World Project

Page 12: First Venture into the Android World

Layout

Page 13: First Venture into the Android World

Widgets

Page 14: First Venture into the Android World

XML CODE

Text code to change

XML code for TextView control

Page 15: First Venture into the Android World

Run As Dialog Box

Android Application

Page 16: First Venture into the Android World

Message in the Android Emulator

Page 17: First Venture into the Android World

Save Project and CloseProgram is saved each time it is runCTRL + F11 – is the shortcut keys for running your Android Application in Eclipse.Close – Click Close button or File Menu

Page 18: First Venture into the Android World

Opening a Saved App in EclipseSelect project from the Package Explorer.If not listed on the Package Explorer, click File on the Eclipse menu bar and select import. In the Import dialog box, expand the General folder, and click Existing Project into the Workspace. Click the next buttonClick Browse and find it in your drive.

Page 19: First Venture into the Android World

Delete a ProjectRight click the project name in the package explorer. Select Delete. Click OK

Page 20: First Venture into the Android World

SummaryAndroid is an open source platform.Android OS is freeWe use Eclipse IDE to write applications.Android Emulator allows you to make Android Application without using a physical device.Android use both XML and Java for building an user interface.Package Explorer in Eclipse contains all the folders for an Android project.Layout is a container of objects (TextView, Buttons, and CheckBox controls, etc..)After you create your application, you can test it on the Android Emulator.