如何在应用程序启动时触发Toast通知?
答案 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();
}