1、设置自定义通知的位置
Toast toast=Toast.makeText(MainActivity.this, "Hello", Toast.LENGTH_LONG); toast.setGravity(Gravity.CENTER, 0, 0);
toast.show();