一、运行效果:
二、主函数MainActivity.java:
package com.example.a085_sqliteapp; import androidx.appcompat.app.AppCompatActivity; import android.content.ContentValues; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.Toast; import java.io.File; public class MainActivity extends AppCompatActivity { private String DBNAME = "userInfo.db"; private Button button,button2,button3,button4; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); DBOpenHelper dbsqLiteOpenHelper = new DBOpenHelper(MainActivity.this,DBNAME,null,1); final SQLiteDat