Mini NotePad

This is a sample application, having the features as the notepad like cut, copy, paste and save. You can also edit the Note by opening it again.

Underlying Algorithm:

Basic description of algorithm in step by step form:
1.) Create a Project MyNoteEditer.
2.) Create a class NotesDbAdapter.java, in this class we will use SQLiteDatabase and SQLiteOpenHelper to handle the database, to save and edit the data.

 

 

 

3.) Create a class NewText.java having save, cut, copy and paste functionality:

 

 

 

4.) Create new_text.xml and put the following code in that:

 

 

 

5.) Register this new Activity in AndroidManifest.xml :

 

 

 

6.) Replace the code of main.xml with following code:

 

 

 

7.) Create notes_list.xml and put the following code in that:

 

 

 

8.) Create notes_row.xml and put the following code in that:

 

 

 

9.) Run the Application.

Steps to Create:

1.) Open Eclipse. Use the New Project Wizard and select Android Project Give the respective project name i.e. MyNoteEditer. Enter following information:
Project name: MyNoteEditer
Build Target: Android 2.1
Application name: MyNoteEditer
Package name: com.app.MyNoteEditer
Create Activity: OpenNotes

On Clicking Finish MyNoteEditer code structure is generated with the necessary Android Packages being imported along with OpenNotes.java. Replace the default code of OpenNotes.java with the following:

 

 

 

Output : The final output

Leave a Comment:

10 comments
shanisk says September 20, 2011

[…] Mini NotePad Posted by Sushant on August 17, 2011 This is a sample application, having the features as the notepad like cut, copy, paste and save. You can also edit the Note by opening it again. Underlying Algorithm: Basic description of algorithm in step by step form: 1.) Create a Project MyNoteEditer. 2.) Create a class NotesDbAdapter.java, in this… Filed in: Android Development 0 […]

Reply
Johan du Plessis says September 24, 2011

Thanx – This helped me to understand the basics

Reply
Rick says May 17, 2012

Awesome. Can you put some kind of open source licence on this or do you not want other s using your code?

Reply
masum says November 14, 2012

I’m new in adroid. I’m trying to follow and build as advised. But I couldn’t build it for various error. As all the code is given but not as a project. Could you please give a Eclips project. Thanks in advance!

Reply
Android example project compilation failed? - Android Forums says November 14, 2012

[…] project compilation failed? I'm new at Anroid world. Just learning. I want to study build this project. But it fails for all R.* members and so other reasons. After searching the web I found […]

Reply
Sumit says January 18, 2013

awesome !

Reply
Jeff says April 3, 2013

Hello,
Great app, It worked beautifully. Is there a way to delete the saved notes?

Reply
paresh says May 11, 2013

thankx for help

Reply
Imran says June 28, 2013

sir,
Your post was very good but i am unable to open it again after it saved plz help me sir

Reply
Imran says June 28, 2013

fill data requires deprecation………..

Reply
Add Your Reply