申请开始时敬酒

时间:2014-03-03 23:54:04

标签: android toast

如何在应用程序启动时触发Toast通知?

1 个答案:

答案 0 :(得分:2)

将toast添加到onCreate方法中:

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    Toast.makeText(this, "This is my Toast!", Toast.LENGTH_LONG).show();
}