示例#1
0
  @Override
  protected void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    itemsDao = new ItemsDao(this);
    itemsDao.open();
  }
示例#2
0
 private void deleteAllItems() {
   itemsDao.deleteAll();
 }
示例#3
0
 @Override
 protected void onPause() {
   itemsDao.close();
   super.onPause();
 }
示例#4
0
 @Override
 protected void onResume() {
   itemsDao.open();
   super.onResume();
 }