Browse through more Android tutorials. If you'd like to see a tutorial on any particular topic, do leave a comment in the wishlist page. We frequently post new tutorials along with app releases. You may subscribe to our newsletter to get all updates in your inbox.
Now you can get the latest Java source bundled with each app update. Install the app from Google Play and go to Settings > Extras.

1. Overview

In this article, we show you how to create a notepad application in Android. The first thing to do after you have your (million dollar?!!) app idea is to list down all the features you want in your app. Then sketch the design and flow of the application before you jump into actual development.
Since this is our first app in the series so we will focus more on Android UI layouts and widgets and hence the design of the application and keep things simple functionality wise. However, we will make a pretty decent application with most of the basic features a notepad application should have and may be a little more in some other respect.
Here is the final result we want to achieve and which you might have sketched before getting into coding.

As you can see the main screen of the app consists of a TabHost which allows the user to browse and manage the notes. The Browse tab is implemented using a ListView whereas the Manage tab is implemented using ExpandableListView.
This app allows user to create a simple note, a checklist, or a snapshot. So we will create separate Activity for each of these use cases. We will be using various Android widgets to implement the screens. Additionally, there is a settings screen (not shown above) implemented using PreferenceActivity which allows user to save his preferences.
We will give all the details as we implement each feature so let's start coding!

2. Create a new Eclipse Android project

In Eclipse, go to File > New > Project and in the New Project dialog, expand Android folder to select Android Project.
In New Android Project dialog enter the project details as follows.
Project name: SmartPad
Build Target: Android 2.1
Application name: Smart Pad
Package name: com.appsrox.smartpad
Create Activity: MainActivity
Click Finish. The project gets created in your workspace.
It's a good approach to define the data model first before diving into UI implementation so that's what we discuss next.

3. Define the Data model

The app needs to support persistance of a simple note, a checklist, and a snapshot as well as allow user to categorize his notes. Here is a class diagram which depicts the data model.
Android provides SQLite database for data persistence and SQLiteOpenHelper class for managing the database. It's an abstract class which we need to subclass and implement the onCreate() and onUpgrade() methods.
Create a package com.appsrox.smartpad.model to hold the data model classes. Additionally, create DbHelper class which extends SQLiteOpenHelper.
Here is some relevant piece of code from DbHelper.java

We will update this file as and when we add components to our application.

5. The Application class

The Application class is a good place to declare all globals in an application although it's not mandatory. To use it we create a class which extends Application and override the onCreate() method where the variables are instantiated.

We will discuss more about SharedPreferences later when we develop the Preference screen.
We have finished all the ground work and this calls for a logical break. Next we will develop the UI and implement the features; the thing that sells your app.