0

由于银河选项卡没有状态栏,所以我无法在其上应用正常的推送通知。有没有其他方法可以实现这一点,例如弹出对话框?

4

1 回答 1

1

如果你真的想避免状态栏(afaik GalaxyTab 确实有一个!)你可以简单地使用一个 alertDialog,正如你已经提到的:

在此处输入图像描述

AlertDialog alertDialog = new AlertDialog.Builder(this).create();
alertDialog.setTitle("Reset...");
alertDialog.setMessage("Are you sure?");
alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
   public void onClick(DialogInterface dialog, int which) {
      // here you can add functions
   }
});
alertDialog.setIcon(R.drawable.icon);
alertDialog.show();

http://www.wikihow.com/Show-Alert-Dialog-in-Android

于 2012-06-18T10:31:25.130 回答