zoukankan      html  css  js  c++  java
  • 个人冲刺(四阶段)——体温上报app(一阶段)

    任务:完成了后台数据库的类模块

    MyDBHelper.java

    package com.example.helloworld;
    
    import android.content.Context;
    import android.database.sqlite.SQLiteDatabase;
    import android.database.sqlite.SQLiteOpenHelper;
    import android.widget.Toast;
    
    import androidx.annotation.Nullable;
    
    public class MyDBHelper extends SQLiteOpenHelper {
        private Context context;
        public MyDBHelper(Context context,String name,int version) {
            super(context, name, null, version);
            this.context=context;
        }
    
        @Override
        public void onCreate(SQLiteDatabase db) {
            String sql="create table personwendu(id integer primary key autoincrement, address varchar, name varchar, wendu varchar, dateandtime varchar)";
            db.execSQL(sql);
            Toast.makeText(context,"数据加入成",Toast.LENGTH_LONG).show();
        }
    
        @Override
        public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
    
        }
    }
  • 相关阅读:
    rem 适配
    1px实现方案
    伪类选择器
    css中如何做到容器按比例缩放
    rem移动端适配方案
    Quartz.NET实现作业调度
    iPhone X
    优化hexo访问速度-将hexo部署到云主机VPS
    网页设计命名规范
    网站注册页面
  • 原文地址:https://www.cnblogs.com/zyj3955/p/14869627.html
Copyright © 2011-2022 走看看