现在的位置: 首页 > 综合 > 正文

android弹出对话框

2013年10月03日 ⁄ 综合 ⁄ 共 775字 ⁄ 字号 评论关闭

以下摘自:http://php.11519.net/adeve/?p=4

public void QuitApp()
{
        
new AlertDialog.Builder(Hello.this).setTitle("提示"
).setMessage(
                
"确定退出?").setIcon(R.drawable.quit).setPositiveButton("确定"
,
                
new
 DialogInterface.OnClickListener() {
                    
public void onClick(DialogInterface dialog, int
 whichButton)
{    
                         billdb.close();
                         finish();
                     }
                 }).setNegativeButton(
"取消"
,
                
new
 DialogInterface.OnClickListener() {
                    
public void onClick(DialogInterface dialog, int
 whichButton)
{
                     }
                 }).show();

     }

///////////////////////////////////////////////////////

Toast.makeText(Hello.this,"提示信息:",Toast.LENGTH_LONG).show();

抱歉!评论已关闭.