From 56c8df1b0637c380bd7aa3f9a928430abfba2c7d Mon Sep 17 00:00:00 2001 From: Dirk Dougherty Date: Sat, 8 May 2010 17:15:10 -0700 Subject: [PATCH] sdk change: add index for tictactoe library and app. fix output path for spinner sample app in sdk builds. Change-Id: I51d412e1e78e6bd672eb419d53310eb1194672a3 --- build/sdk.atree | 2 +- samples/TicTacToeLib/_index.html | 42 +++++++++++++++++++++ samples/TicTacToeMain/_index.html | 63 +++++++++++++++++++++++++++++++ 3 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 samples/TicTacToeLib/_index.html create mode 100644 samples/TicTacToeMain/_index.html diff --git a/build/sdk.atree b/build/sdk.atree index 6d1bd2744..4b76de4b6 100644 --- a/build/sdk.atree +++ b/build/sdk.atree @@ -98,7 +98,7 @@ development/samples/Snake samples/${PLATFORM_NAME}/Snake development/samples/SoftKeyboard samples/${PLATFORM_NAME}/SoftKeyboard development/samples/JetBoy samples/${PLATFORM_NAME}/JetBoy development/samples/SearchableDictionary samples/${PLATFORM_NAME}/SearchableDictionary -development/samples/Spinner samples/${PlATFORM_NAME}/Spinner +development/samples/Spinner samples/${PLATFORM_NAME}/Spinner development/samples/SpinnerTest samples/${PLATFORM_NAME}/SpinnerTest development/samples/ContactManager samples/${PLATFORM_NAME}/ContactManager development/samples/MultiResolution samples/${PLATFORM_NAME}/MultiResolution diff --git a/samples/TicTacToeLib/_index.html b/samples/TicTacToeLib/_index.html new file mode 100644 index 000000000..8a7f2beaf --- /dev/null +++ b/samples/TicTacToeLib/_index.html @@ -0,0 +1,42 @@ +

This application is an example of an Android library project, a type of +project that lets you store and manage shared code and resources in one place, +then make them available to your other Android applications.

+ +

The TicTacToeLib library project is designed to provide a game-play Activity, +GameActivity to other applications. Dependent applications simply +launch the Activity using an explicit intent — once launched, +GameActivity assumes control of the application lifecycle and +handles all events and UI interactions.

+ + + +

If you want to build the TicTacToeLib application, you can obtain it by +downloading the "Samples for SDK API 8" component (or higher version) into your +SDK, using the Android SDK and AVD Manager.

+ +

Note that you can not build and run TicTacToeLib independently, since it is a +library project and not a true Android application project. To run it, you need +to build the application that uses the library project — in this case, the +TicTacToeMain application, which is also included in the Samples +SDK comnponent.

+ +

To build an application that uses a library project, you also need to update +to the latest version of the SDK tools (r6 or higher) and Android platforms, as +well as the latest version of ADT (0.9.7 or higher), if you are developing in +Eclipse.

+ +

For information about how to set up Android library projects, refer to +Developing +in Eclipse with ADT or Developing in +Other IDEs, depending on your environment.

\ No newline at end of file diff --git a/samples/TicTacToeMain/_index.html b/samples/TicTacToeMain/_index.html new file mode 100644 index 000000000..439bf9a2f --- /dev/null +++ b/samples/TicTacToeMain/_index.html @@ -0,0 +1,63 @@ +

This sample demonstrates how an application can make use of shared code and +resources stored in an Android library project.

+ +

In this case, the TicTacToeMain application project includes a reference to +the TicTacToeLib library project. When you build the TicTacToeMain application, +the build tools look for the library project and compile it's code and resources +as part of the main application's .apk file. The main application +is designed with a launcher activity called MainActivity, shown at +left, below. When the user presses a button in the View, +MainActivity starts a second activity, GameActivity, +which is declared in the library project.

+ + + +

The TicTacToeLib library project includes a single Activity, +GameActivity, that handles most of the application lifecycle.

+ + + +

If you want to build the TicTacToeMain application, you can obtain it by +downloading the "Samples for SDK API 8" component (or higher version) into your +SDK, using the Android SDK and AVD Manager. Note that the application +project depends on code and resources found in the TicTacToeLib library project +— in order to build TicTacToeMain, you need to add both projects to your +development environment.

+ +

To build an application that uses a library project, you also need to update +to the latest version of the SDK tools (r6 or higher) and Android platforms, as +well as the latest version of ADT (0.9.7 or higher), if you are developing in +Eclipse.

+ +

For information about how to set up Android library projects, refer to +Developing +in Eclipse with ADT or Developing in +Other IDEs, depending on your environment.

+ +Screenshot of the main application +Screenshot of an Activity declared in a library project