最新回答 / 菩提树1986
Toast.makeText(MainActivity.this, str,Toast.LENGTH_SHORT ).show();或者Toast toast=Toast.makeText(this, "" ,Toast.LENGTH_LONG);toast.show();你是先声明toast,申明后就不能再申明的后面调用show方法,而是通过变量toast.show()调用
2018-03-17
AlertDialog.Builder builder=new AlertDialog.Builder(this);
builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface arg0, int arg1) {
Toast.makeText(MainActivity.this, "点击了确定按你也", Toast.LENGTH_LONG).show();
builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface arg0, int arg1) {
Toast.makeText(MainActivity.this, "点击了确定按你也", Toast.LENGTH_LONG).show();