如何變更Toast位置

1.重點程式碼

Toast toast = Toast.makeText(getApplicationContext(), "hello",Toast.LENGTH_LONG);
toast.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.TOP, 0, 100);

toast.show();

沒有留言: