Android提示框

  • Toast.makeText
Toast.makeText(this, "提示消息", Toast.LENGTH_LONG).show();
  • 特点
    自动消失
    无交互能力

  • AlertDialog.Builder
AlertDialog.Builder builder  = new AlertDialog.Builder(MainActivity.this);
builder.setTitle("确认" ) ;
builder.setMessage( "提示消息" ) ;
builder.setPositiveButton("是" ,  null );
builder.show();
  • 特点
    需要用户确认
    有交互能力

你可能感兴趣的:(Android提示框)