传text和resid的两种Toast的写法

public void showToast(String text) {
CustomToast.makeText(getApplicationContext(), text, Toast.LENGTH_SHORT).show();
}


public void showToast(int resId) {
CustomToast.makeText(getApplicationContext(), resId, Toast.LENGTH_SHORT)
.show();

}



你可能感兴趣的:(传text和resid的两种Toast的写法)