zoukankan      html  css  js  c++  java
  • 寒假作业——家庭小账本开发1

    1、连接Android自带的数据库

    import android.content.Context;
    import android.database.sqlite.SQLiteDatabase;
    import android.database.sqlite.SQLiteOpenHelper;
    
    public class DBHelper extends SQLiteOpenHelper {
        // 数据库默认名字
        public static final String db_name= "familyBill2.db";
    
        //用于创建bill表——记录收入
        public static final String CREATE_IN = "create table bill ("
                + "id integer primary key autoincrement, "
                +"date text,"
                + "type text, "
                + "money text)";
    
    
        public DBHelper(Context context, int version) {
            super(context, db_name, null, version);
        }
    
        @Override
        public void onCreate(SQLiteDatabase db) {
            db.execSQL(CREATE_IN);
        }
    
        @Override
        public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        }
    
    
    }

    2、设计目录页面

  • 相关阅读:
    Codeforces Round #609 (Div. 2)
    Educational Codeforces Round 78 (Rated for Div. 2)
    Codeforces
    crontab
    C6 C7的开机启动流程
    平均负载压力测试
    ps 和 top
    if判断
    使用3种协议搭建本地yum仓库
    linux rpm包
  • 原文地址:https://www.cnblogs.com/Lizhichengweidashen/p/14899004.html
Copyright © 2011-2022 走看看