也进行了导入 import android.widget.Toast;
String value = getIntent().getExtras().getString(VALUE);
Context context = this;
CharSequence text = value;
int duration = Toast.LENGTH_LONG;
public Toast T = Toast.makeText(context, text, duration);
T.show(); - this is red and shows an error? does somebody knows what I did wrong?
答案 0 :(得分:1)
改变:
Toast toast = new Toast(context);
toast.setDuration(Toast.LENGTH_SHORT);
toast.setText("");
toast.show();