
src folder
Includes the package for the sample application, namely
com.msi.ibmtutorial
R.java
The Android Developer Tools create this file automatically and represents the
constants needed to access various resources of the Android application. More
on the relationship between the R class and resources is found below.
SaySomething.java
Implementation of the application's primary activity class.
Referenced libraries
Contains android.jar, which is the Android runtime class jar file, found in the
Android SDK.
res folder
Contains the resources for the application, including:
• Icons
• Layout files
• Strings
AndriodManifest.xml
Deployment descriptor of the sample application.
Next, we'll examine the source code in further detail.
The primary activity of the application
The sample application consists of a single activity, namely SaySomething. As
described above, the SaySomething class is implemented in the file
SaySomething.java.
Listing 4. SaySomething.java
package com.msi.ibmtutorial;
import android.app.Activity;
import android.os.Bundle;
public class SaySomething extends Activity
{
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle icicle)
{
ibm.com/developerWorks developerWorks®
Develop Android applications with Eclipse
© Copyright IBM Corporation 1994, 2008. All rights reserved. Page 15 of 35
Comentários a estes Manuais