WEB开发网
开发学院手机开发Android 开发 Android 数据库与MapView总结 阅读

Android 数据库与MapView总结

 2010-11-05 00:54:34 来源:WEB开发网   
核心提示:dbHelper.close();}Intent intent = new Intent();intent.setClass(EX10_06_02.this, EX10_06_03.class);startActivity(intent);finish();}}});}@Overridepublic boolean o

dbHelper.close();

}

Intent intent = new Intent();

intent.setClass(EX10_06_02.this, EX10_06_03.class);

startActivity(intent);

finish();

}

}

});

}

@Override

public boolean onCreateOptionsMenu(Menu menu) {

int idGroup1 = 0;

int orderItem2 = Menu.NONE + 1;

int orderItem3 = Menu.NONE + 2;

menu.add(idGroup1, MENU_EDIT, orderItem2, R.string.str_manu2).setIcon(

android.R.drawable.ic_dialog_info);

menu.add(idGroup1, MENU_DRAW, orderItem3, R.string.str_manu3).setIcon(

R.drawable.hipposmall);

return super.onCreateOptionsMenu(menu);

}

@Override

public boolean onOptionsItemSelected(MenuItem item) {

Intent intent=new Intent();

switch (item.getItemId()) {

case (MENU_EDIT):

if(dbHelper!=null&&dbHelper.getReadableDatabase().isOpen()){

dbHelper.close();

}

intent.setClass(EX10_06_02.this, EX10_06_03.class);

startActivity(intent);

finish();

break;

case (MENU_DRAW):

if(dbHelper!=null&&dbHelper.getReadableDatabase().isOpen()){

dbHelper.close();

}

intent.setClass(EX10_06_02.this, EX10_06_04.class);

startActivity(intent);

finish();

break;

}

return super.onOptionsItemSelected(item);

}

@Override

protected void onResume() {

// TODO Auto-generated method stub

super.onResume();

}

@Override

protected void onPause() {

// TODO Auto-generated method stub

super.onPause();

}

@Override

protected void onDestroy() {

if(dbHelper!=null&&dbHelper.getReadableDatabase().isOpen()){

上一页  1 2 3 4 5 6 7 8 9 10  下一页

Tags:Android 数据库 MapView

编辑录入:coldstar [复制链接] [打 印]
赞助商链接