为什么用Toast.maketext()语句没有效果?
为什么用Toast.maketext()语句没有效果,而用log.i语句有效果???
代码如下:
@Override
public void onCheckedChanged(RadioGroup arg0, int arg1) {
switch (arg1) {
case R.id.radio0:
Toast.makeText(MainActivity.this, "篮球", 1);
Log.i("tag", R.id.radio0+"");
break;
case R.id.radio1:
Toast.makeText(MainActivity.this, "足球", 1);
Log.i("tag", R.id.radio1+"");
break;
case R.id.radio2:
Toast.makeText(MainActivity.this, "乒乓球", 1);
Log.i("tag", R.id.radio2+"");
break;
default:
break;
}
}