ドキュメント > Androidアプリケーション構築のチュートリアル

「ドキュメント/Androidアプリケーション構築のチュートリアル」の編集履歴(バックアップ)一覧はこちら

ドキュメント/Androidアプリケーション構築のチュートリアル - (2007/11/20 (火) 19:08:53) の1つ前との変更点

追加された行は緑色になります。

削除された行は赤色になります。

* チュートリアル:ノートパッドアプリケーションを作る このチュートリアルでは、みなさんに実際に手を動かしてもらいながらアプリケーションを作成するための Android フレームワークやツールの紹介を行います。プレコンフィギュレーションファイルから始め、簡単なノートパッドアプリケーションを開発する過程を通じてプロジェクトのセットアップ方法、アプリケーションロジックの開発方法、ユーザインターフェースの開発方法、アプリケーションのコンパイルと起動方法についての具体的な例を示します。 このチュートリアルではノートパッドアプリケーションの開発をいくつかのエクササイズ(下記参照)に分けて進めていきます。それぞれのエクササイズはいくつかのステップからなります。エクササイズの中のステップに沿って進んでいくとアプリケーションが完成していき、改良が進んでいきます。エクササイズの中ではそれぞれのステップについて詳しい説明が与えられ、アプリケーションを完成させるために必要なコードのサンプルも示されています。 チュートリアルを終えると、機能を果たす Android アプリケーションが完成し、Android アプリケーションの開発において重要な考え方についての知識が得られていることでしょう。Android SDK に付属するノートパッドアプリケーションのサンプルコードを研究・利用してより複雑な機能を加えてみるのもよいでしょう。 ** 目次 本チュートリアルの対象となる読者 準備 エクササイズ その他のリソースとチュートリアル **本チュートリアルの対象となる読者 本チュートリアルは熟練した開発者(特に Java 言語の知識のある方)を想定して書かれています。これまでに Java アプリケーションを書いたことが無い方でも本チュートリアルを読み進めることはできますが、読み進めるスピードは落ちてしまうかもしれません。 また、本チュートリアルは「Installing the SDK」と「Hello, Android」ドキュメントの内容を前提として書かれています。これらのドキュメントでは Android アプリケーションの開発環境のセットアップについて詳説しています。本チュートリアルを開始する前に、これらのドキュメントに従って SDK のインストールとセットアップを済ませておきましょう。 最後に、本チュートリアルではAndroid プラグインをインストールした Eclipse 開発環境上でのノートパッドアプリケーション開発を解説しています。Eclipse をお使いでない場合、エクササイズを進めていくことはできますが、Eclipse 上での操作がお使いの環境でどの操作に相当するのかを読み解く必要があります。Android SDK に付属するノートパッドアプリケーションのサンプルコードを研究・利用してより複雑な機能を加えることもできます。 本チュートリアルは Android アプリケーションについての基本的な概念や用語を知っていることを仮定しています。基本的な概念や用語を全く知らない方は、「Overview of an Android Application」と「Application Lifecycle」を先に読んでおいてください。 ** Preparing for the Exercises Before you begin, it's important that you install the SDK and set up your Eclipse development. Once your environment is set up, locate and unpack the exercises archive, which is included in the SDK package. The archive includes a series of Eclipse project files that are used in the exercises. You can use these project files instead of creating and configuring your own project files. To get the tutorial project files: + Download the project exercises archive (.zip) + Unpack the archive file to a suitable location on your machine + Open the NotepadCodeLab folder Inside the NotepadCodeLab folder, you should see six project files: Notepadv1, Notepadv2, Notepadv3, Notepadv1Solution, Notepadv2Solution and Notepadv3Solution. The Notepadv* projects are the starting points for each of the exercises, while the Notepadv*Solution projects are the exercise solutions. If you are having trouble with a particular exercise, you can compare your current work against the exercise solution to try and track down the problem. ** Exercises The table below lists the tutorial exercises and describes the development areas that each covers. Each exercise assumes that you have completed the previous example (if any). | Exercise 1 | Construct a simple notes list that lets the user add new notes but not edit them. Demonstrates the basics of ListActivities and creating and handling menu options. Uses a SQLite database to store the notes. | |Exercise 2 | Add a second activity to the application. Demonstrates constructing a new Activity, adding it to the Android manifest, passing data between the activities, and using more advanced screen layout. Also shows how to invoke another activity asynchronously using startSubActivity().| |Exercise 3 | Add handling of life-cycle events to the application, to let it maintain application state across the life cycle.| |Extra Credit | Demonstrates how to use the Eclipse debugger and how you can use it to view lifecycle events as they are generated. This section is optional but highly recommended.| ** Other Resources and Further Learning - For a lighter but broader introduction to concepts not covered in the tutorial, take a look at Common Android Tasks. - The Android SDK includes a variety of fully functioning sample applications that make excellent opportunities for further learning. You can find the sample applications in the samples/ directory. - This tutorial draws from the full Notepad application included in the samples/ directory of the SDK. When you are done with the tutorial, it is highly recommended that you take a closer look at the full Notepad application, as it demonstrates a variety of interesting additions for your application, such as: o Setting up a custom striped list for the list of notes. o Creating a custom text edit view that overrides the draw() method to make it look like a lined notepad. o Implementing a full ContentProvider for notes. o Reverting and discarding edits instead of just automatically saving them.
* チュートリアル:ノートパッドアプリケーションを作る このチュートリアルでは、みなさんに実際に手を動かしてもらいながらアプリケーションを作成するための Android フレームワークやツールの紹介を行います。プレコンフィギュレーションファイルから始め、簡単なノートパッドアプリケーションを開発する過程を通じてプロジェクトのセットアップ方法、アプリケーションロジックの開発方法、ユーザインターフェースの開発方法、アプリケーションのコンパイルと起動方法についての具体的な例を示します。 このチュートリアルではノートパッドアプリケーションの開発をいくつかのエクササイズ(下記参照)に分けて進めていきます。それぞれのエクササイズはいくつかのステップからなります。エクササイズの中のステップに沿って進んでいくとアプリケーションが完成していき、改良が進んでいきます。エクササイズの中ではそれぞれのステップについて詳しい説明が与えられ、アプリケーションを完成させるために必要なコードのサンプルも示されています。 チュートリアルを終えると、機能を果たす Android アプリケーションが完成し、Android アプリケーションの開発において重要な考え方についての知識が得られていることでしょう。Android SDK に付属するノートパッドアプリケーションのサンプルコードを研究・利用してより複雑な機能を加えてみるのもよいでしょう。 ** 目次 本チュートリアルの対象となる読者 準備 エクササイズ その他のリソースとチュートリアル **本チュートリアルの対象となる読者 本チュートリアルは熟練した開発者(特に Java 言語の知識のある方)を想定して書かれています。これまでに Java アプリケーションを書いたことが無い方でも本チュートリアルを読み進めることはできますが、読み進めるスピードは落ちてしまうかもしれません。 また、本チュートリアルは「Installing the SDK」と「Hello, Android」ドキュメントの内容を前提として書かれています。これらのドキュメントでは Android アプリケーションの開発環境のセットアップについて詳説しています。本チュートリアルを開始する前に、これらのドキュメントに従って SDK のインストールとセットアップを済ませておきましょう。 最後に、本チュートリアルではAndroid プラグインをインストールした Eclipse 開発環境上でのノートパッドアプリケーション開発を解説しています。Eclipse をお使いでない場合、エクササイズを進めていくことはできますが、Eclipse 上での操作がお使いの環境でどの操作に相当するのかを読み解く必要があります。Android SDK に付属するノートパッドアプリケーションのサンプルコードを研究・利用してより複雑な機能を加えることもできます。 本チュートリアルは Android アプリケーションについての基本的な概念や用語を知っていることを仮定しています。基本的な概念や用語を全く知らない方は、「Overview of an Android Application」と「Application Lifecycle」を先に読んでおいてください。 **準備 チュートリアルを開始する前に、 SDK と Eclipse 開発環境のセットアップが必須です。開発環境が整ったら、エクササイズのアーカイブファイルを展開しましょう。アーカイブファイルは SDK パッケージに含まれています。アーカイブにはそれぞれのエクササイズで使う一連の Eclipse プロジェクトファイルが入っています。これらのプロジェクトファイルを使えば自分でプロジェクトファイルを設定する必要がありません。 チュートリアルプロジェクトファイルを準備するには、 +プロジェクトエクササイズアーカイブ(.zip)をダウンロードします。 +好きな場所にアーカイブファイルを展開します。 +展開してできた NotepadCodeLab フォルダを開きます。 NotepadCodeLab フォルダには、6つのプロジェクトファイルがあるはずです( Notepadv1、 Notepadv2、 Notepadv3、 Notepadv1Solution、 Notepadv2Solution 、Notepadv3Solution)。Notepadv* プロジェクトはそれぞれのエクササイズを開始する時点で使うファイル、Notepadv*Solution プロジェクトはエクササイズの終了時点でできているはずの「模範解答」です。何か問題が起きた場合には Solution ファイルと比べてみて問題点を修正するとよいでしょう。 ** Exercises The table below lists the tutorial exercises and describes the development areas that each covers. Each exercise assumes that you have completed the previous example (if any). | Exercise 1 | Construct a simple notes list that lets the user add new notes but not edit them. Demonstrates the basics of ListActivities and creating and handling menu options. Uses a SQLite database to store the notes. | |Exercise 2 | Add a second activity to the application. Demonstrates constructing a new Activity, adding it to the Android manifest, passing data between the activities, and using more advanced screen layout. Also shows how to invoke another activity asynchronously using startSubActivity().| |Exercise 3 | Add handling of life-cycle events to the application, to let it maintain application state across the life cycle.| |Extra Credit | Demonstrates how to use the Eclipse debugger and how you can use it to view lifecycle events as they are generated. This section is optional but highly recommended.| ** Other Resources and Further Learning - For a lighter but broader introduction to concepts not covered in the tutorial, take a look at Common Android Tasks. - The Android SDK includes a variety of fully functioning sample applications that make excellent opportunities for further learning. You can find the sample applications in the samples/ directory. - This tutorial draws from the full Notepad application included in the samples/ directory of the SDK. When you are done with the tutorial, it is highly recommended that you take a closer look at the full Notepad application, as it demonstrates a variety of interesting additions for your application, such as: o Setting up a custom striped list for the list of notes. o Creating a custom text edit view that overrides the draw() method to make it look like a lined notepad. o Implementing a full ContentProvider for notes. o Reverting and discarding edits instead of just automatically saving them.

表示オプション

横に並べて表示:
変化行の前後のみ表示:
ツールボックス

下から選んでください:

新しいページを作成する
ヘルプ / FAQ もご覧ください。