Simple notepad implementation and analysis (I) functional structure sorting

Source: Internet
Author: User

Preface

 

In fact, this notebook is easier to understand than the Sina client, and is more suitable for colleagues who are not at a high level like the monks. The official website or Baidu can find many excellent mature products. Here, we will study the examples on the official website, train our hands, and review some of the previous knowledge points.

 

Functional requirements

 

As the name suggests, notepad should be able to record the title, content, and other basic information of each record at least, which can be stored in a database. Add and delete NOTES. You can use the menu. The last is the problem of beautification. It can be simple, but not too simple. The following figure shows the framework.

 

General idea

 

The implementation cases of these functions have been provided. Here is a brief introduction. There are not many things we will use. The most important thing is the database's "crud", add (create), query (retrieve) (obtain data again), update (update) and delete, define a class that inherits the sqliteopenhelper class, used to write the method we need. The main interface uses listview to connect to the Data. Each record is an item in the listview. This item is filled with an XML layout containing two textviews. As for menus, the application menu and context menu are used. The former is triggered by clicking the menu key on the mobile phone, and the latter is implemented by pressing the screen for 3 seconds. (To be continued)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.