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

Android 数据库与MapView总结

 2010-11-05 00:54:34 来源:WEB开发网   
核心提示:{// TODO Auto-generated method stubsuper.onCreate(savedInstanceState);setContentView(R.layout.layout_list);mListView01 = (ListView)findViewById(R.id.myListView1

{

// TODO Auto-generated method stub

super.onCreate(savedInstanceState);

setContentView(R.layout.layout_list);

mListView01 = (ListView)findViewById(R.id.myListView1);

dbHelper = new MySQLiteOpenHelper

(this, "mydb", null, version, tables, fieldNames, fieldTypes);

updateListView();

mListView01.setOnItemClickListener

(new ListView.OnItemClickListener()

{

public void onItemClick

(AdapterView parent, View v, int id, long arg3)

{

// TODO Auto-generated method stub

/* f_id字段 */

intItemSelected = id;

/* 弹出的菜单提供两种功能(编辑、删除) */

String[] dlgMenu=

{

getResources().getText(R.string.str_edit_it).toString(),

getResources().getText(R.string.str_del_it).toString()

};

new AlertDialog.Builder(EX10_06_03.this)

.setTitle(R.string.str_whattodo)

.setItems(dlgMenu, mListener1)

.setPositiveButton(R.string.str_cancel,

new DialogInterface.OnClickListener()

{

public void onClick(DialogInterface dialog, int which)

{

}

}).show();

}

});

}

private OnClickListener mListener1=

new DialogInterface.OnClickListener()

{

public void onClick(DialogInterface dialog, int which)

{

// TODO Auto-generated method stub

switch(which)

{

case 0:

/* 数据修改 */

if(intItemSelected>=0)

{

/* 创建背景模糊效果的前景窗口 */

final Dialog d = new Dialog(EX10_06_03.this);

Window window = d.getWindow();

window.setFlags

(

WindowManager.LayoutParams.FLAG_BLUR_BEHIND,

WindowManager.LayoutParams.FLAG_BLUR_BEHIND

上一页  10 11 12 13 14 15 16 17 18 19 20  下一页

Tags:Android 数据库 MapView

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