Android 数据库与MapView总结
2010-11-05 00:54:34 来源:WEB开发网{
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
);
d.setTitle(R.string.str_edit_it);
d.setContentView(R.layout.layout_edit);
/* 将User点击的餐厅数据放入窗口Widget当中 */
final EditText mEditText01 =
(EditText)d.findViewById(R.id.myEditText1);
final EditText mEditText02 =
(EditText)d.findViewById(R.id.myEditText2);
final EditText mEditText03 =
(EditText)d.findViewById(R.id.myEditText3);
mEditText01.setText
(allRestaurantName.get(intItemSelected));
mEditText02.setText
(allRestaurantAddress.get(intItemSelected));
mEditText03.setText
(allRestaurantCal.get(intItemSelected));
/* 更新数据按钮事件处理 */
更多精彩
赞助商链接