如何解决此代码(ACTIVITY无法加载和停止应用程序)?

时间:2019-01-29 15:34:02

标签: java android

我尝试修复此代码,但未成功

我不知道是什么原因关闭了该应用程序

    Activity a=new Activity();

public void onSaveInstanceState(Bundle outState) {
    outState.putString("message", "This is my message to be reloaded");
    PersistableBundle bb=new PersistableBundle();
    bb.putString("m1","m2");
   a.onSaveInstanceState(outState,bb);
}


public void onCreate() {
    Activity a=new Activity();
    Bundle b=new Bundle();
    PersistableBundle bb=new PersistableBundle();
    bb.putString("m1","m2");

    a.onCreate(b,bb);
    int x=R.layout.activity_client;
    a.setContentView(x);

0 个答案:

没有答案