新活动未显示有关新活动的任何布局。如果我用这个 -
onCreate(Bundle savedInstanceState, PersistableBundle persistentState) {
super.onCreate(savedInstanceState, persistentState);
}
但是当我从PersistableBundle persistentState
移除onCreate
时,方法布局会呈现为新活动。谁能解释一下这个??
答案 0 :(得分:1)
使用此:
onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
答案 1 :(得分:0)
使用此:
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
// this method sets the layout for your activity
// main.xml should be defined in your layout folder
setContentView(R.layout.main);
}