list=converCursortoList(cursor);Intentintent=newIntent(Dict.this,show.class);Bundlebundle=newBundle();bundle.putSerializable("list",list);intent.putExtras(bundle);startActivity(intent);}-IMDN开发者社群-imdn.cn"> list=converCursortoList(cursor);Intentintent=newIntent(Dict.this,show.class);Bundlebundle=newBundle();bundle.putSerializable("list",list);intent.putExtras(bundle);startActivity(intent);} - IMDN开发者社群-imdn.cn">
登录
首页 » Android » Android SQLiteOpenHelper 类代码

Android SQLiteOpenHelper 类代码

于 2022-01-26 发布 文件大小:15.89 kB
0 122
下载积分: 2 下载次数: 1

代码说明:

Android SQLiteOpenHelper 类代码,这同样是一个简单级别的SQLite实例,主要教你一些基础的SQLite用法,本源码通过编写一个简单的词汇添加小程序,让你了解如何向SQLLITE中添加词汇,查找词汇,查询的sql语句如何编写,以及如何创建一个SQLSite数据表等。相对简单,编译后的运行效果,请看下边的截图。添加内容和查询内容的代码,如下示:   //添加词汇   addWordBtn.setOnClickListener(new View.OnClickListener() {   @Override   public void onClick(View v) {    inflateInsert(mydb.getReadableDatabase(),wordEdit.getText().toString(),detailEdit.getText().toString());   }   });   //查找词汇   seachWordBtn.setOnClickListener(new View.OnClickListener() {   @Override   public void onClick(View v) {   //查询的sql   String querySql = "select * from mydb where word like ?";   Cursor cursor = mydb.getWritableDatabase().rawQuery(querySql, new String[]{    "%"+seachWordEdit.getText().toString() + "%"   });   ArrayList> list = converCursortoList(cursor);   Intent intent = new Intent(Dict.this, show.class);   Bundle bundle = new Bundle();   bundle.putSerializable("list", list);   intent.putExtras(bundle);   startActivity(intent);   }

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • PhoneGap
    PhoneGap.zip,方便快捷开发Android,IOS客户端的开发(PhoneGap.zip, convenient and efficient development of developing Android, IOS clients)
    2014-02-19 10:37:55下载
    积分:1
  • 湍流普朗特数UDF(Aoki.c)
    湍流普朗特数UDF(Aoki.c)
    2020-01-16下载
    积分:1
  • timerpickercompat
    用fragment实现的timepicker,风格为material design,接口友好,有白天模式和夜间模式,其中白天模式可设置主题色
    2022-03-25 03:17:11下载
    积分:1
  • Adroid 手机电话录音
    用于记录调用上你的手机在运行时......这是艾弗里好应用 oimfoirnkl 兰桂坊 vkrv v、 lk kz k、 d、 v、 d lkv lkk femfm ck、 l、 s 拼箱、 rgzrghtrhtr
    2022-01-24 16:41:48下载
    积分:1
  • LocationMap
    一个简单的地图位置定位android应用,在这个基础上可以再通过GPS来获取定位信息(A simple map positioning android applications, on this basis could be obtained by GPS positioning information )
    2014-06-02 15:48:49下载
    积分:1
  • 基于stm32f103c8t6 spi-flash
    基于stm32f103c8t6 spi-flash
    2021-05-06下载
    积分:1
  • 朋友圈
    Android朋友圈简单实现。Android朋友圈简单实现。Android朋友圈简单实现。Android朋友圈简单实现。Android朋友圈简单实现。Android朋友圈简单实现。Android朋友圈简单实现。Android朋友圈简单实现。Android朋友圈简单实现。
    2023-08-18 15:35:04下载
    积分:1
  • C 语言常见问题集
    【实例简介】C 语言常见问题集
    2021-12-14 00:45:35下载
    积分:1
  • 4013724
    说明:  本程序是对V-BLAST系统及其检测算法的仿真,可采用BPSK,QPSK,16QAM,64QAM调制,检测算法为ML,MM(This program is to simulate the V-BLAST system and its detection algorithm, which can be modulated by BPSK,QPSK,16QAM,64QAM, and the detection algorithm is ML,MM.)
    2019-03-28 05:10:23下载
    积分:1
  • android左右滑动引导页面 例子源码下载
    android左右滑动引导页面 例子源码下载
    2015-04-04下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载