I've noticed in some coding people use icicle with the onCreate method, and I was wondering what it is exactly:
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
?
"icicle" is sometimes used as the name of the parameter because onSaveInstanceState()
used to be called onFreeze()
.
The name isn't magic. It's just a placeholder for one of the formal parameters. As shown by the API, onCreate takes one Bundle parameter. It's up to you what to call it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With