toast .setGravity(Gravity.TOP |Gravity.LEFT, 0, 0);
来让它出现在左上角. 增加第二个参数的值可以让它偏右, 增加第三个参数的值让它偏下.
Toast toast =
Toast.makeText(this, "toast content here", Toast.LENGTH_SHORT);
// or something alike
toast.setGravity(Gravity.TOP | Gravity.CENTER, 80, 80);
toast.show();