Toast 不需要你new吧,你需要自定义吗?
Toast toast = new Toast(getApplicationContext());
toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);
toast.setDuration(Toast.LENGTH_LONG);
toast.setView(layout);
toast.show();
这才是自定义Toast
一般用法:
Toast.makeText(getApplicationContext(), "aaaa", Toast.LENGTH_SHORT).show();