如何在我的Android活动中使用Sqlite数据库? [英] How can i use Sqlite database in my android activity?

查看:221
本文介绍了如何在我的Android活动中使用Sqlite数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用sqlite数据库创建一个示例应用程序不幸的是我不熟悉sqlite数据库的概念。我有以下要求:

I am creating a sample application using sqlite database unfortunately I am not familiar in sqlite database concepts. I have the following requirements,


  1. 我有一个名为quotes.db的sqlite数据库。具有两个字段的数据库是数字和报价。

  2. 在我的活动中,我有两个字段,一个是edittext,另一个是按钮。

  3. 当用户输入编辑文本中的值(数字),然后单击按钮。现在我显示存储在数据库中的相应引号。

如果任何一个示例代码片段与此类邮件相似。提前感谢。

if any one having sample code snippet similar to this kindly post. Thanks in advance.

推荐答案

您可以按照本教程,介绍Android应用程序,尤其是Android中的数据库。

You can follow this tutorial which is an introduction to Android apps and especially to databases in Android.

网站:


这篇关于编写记事本应用程序的教程给你一个实践的
介绍Android框架和你用来构建
应用程序的工具。从预配置的项目文件开始,它
引导您完成开发一个简单的记事本
应用程序的过程,并提供了如何设置
项目的具体示例,开发应用程序逻辑和用户界面,然后
编译并运行应用程序。

This tutorial on writing a notepad application gives you a "hands-on" introduction to the Android framework and the tools you use to build applications on it. Starting from a preconfigured project file, it guides you through the process of developing a simple notepad application and provides concrete examples of how to set up the project, develop the application logic and user interface, and then compile and run the application.

这篇关于如何在我的Android活动中使用Sqlite数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆