取代Toast.makeText(this, “String“, Toast.LENGTH_SHORT).show();总是报错
新建一个JavapublicvoidSM(Viewview,Stringstr){Snackbarsnackbar=Snackbar.make(view,str,800);ViewsnackBarView=snackbar.getView();snackbar.setTextColor(Color.RED);//设置文字颜色snackbar.getView().setBackgroundResou