Hello Friends I hope all will be well Dear brothers i have been facing an error of offset in simple gravity toast enter image description here
use setGravity method
Toast toast = Toast.makeText(this, "Hello", Toast.LENGTH_SHORT);
toast.setGravity(Gravity.CENTER, 0, 0);
toast.show();