Android的icicle参数是什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/919153/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is Android's icicle parameter?
提问by wavyGravy
I've noticed in some coding people use icicle with the onCreate method, and I was wondering what it is exactly:
我注意到在一些编码中人们使用 icicle 和 onCreate 方法,我想知道它到底是什么:
public class About extends Activity {
@Override
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.whatup);
}
Is this the same thing as savedInstanceState
?
这是同一个东西savedInstanceState
吗?
回答by Brad Ackerman
"icicle" is sometimes used as the name of the parameter because onSaveInstanceState()
used to be called onFreeze()
.
"icicle" 有时用作参数的名称,因为onSaveInstanceState()
以前被称为onFreeze()
.