参考:https://www.cnblogs.com/dmrbell/p/11647945.html
不多说直接上代码,测试可用
Toast mToast = Toast.makeText(getApplicationContext(), getResources().getString(R.string.pay_succ), Toast.LENGTH_SHORT);
LinearLayout layout = (LinearLayout) mToast.getView();
TextView tv = (TextView) layout.getChildAt(0);
// 设置字体大小
tv.setTextSize(22);
// 设置显示位置
mToast.setGravity(Gravity.BOTTOM, 0, 100);
mToast.setText(getResources().getString(R.string.pay_succ));
mToast.show();