我在启动活动中使用数据库。但是每次启动我的应用程序都比之前的启动时间花费更多的时间。请帮我查询。
private CreateDatabase db;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
Thread t = new Thread() {
public void run() {
try {
db = new CreateDatabase(Splash.this);
final SQLiteDatabase w = db.getWritableDatabase();
w.execSQL("insert into Fin values( '" +"AAAAAAA"+ "','" +"BBBBBBBBBBBBBBBBB"+ "', '" +0+ "')");
w.execSQL("insert into Fin values( '" +"CCCCCCCCCCCC"+ "','" +"DDDDDDDDD"+ "', '" +12+ "')");
w.close();
db.close();
sleep(5000);
Intent it = new Intent("pack1.exp.DASHBOARD");
startActivity(it);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
finish();
}
}
};
t.start();
}