自定义toast消息
View toastRoot = LayoutInflater.from(BaseActivity.this).inflate(
R.layout.common_toast, null);//自定义布局
((TextView) toastRoot.findViewById(R.id.toast_text))
.setText(getString(resId));//设置toast内容
Toast toast = new Toast(BaseActivity.this);
toast.setGravity(Gravity.CENTER, 0, 0);
toast.setDuration(Toast.LENGTH_SHORT);
toast.setView(toastRoot);
toast.show();