Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is Android's icicle parameter?

Tags:

android

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?

like image 783
wavyGravy Avatar asked May 28 '09 04:05

wavyGravy


2 Answers

"icicle" is sometimes used as the name of the parameter because onSaveInstanceState() used to be called onFreeze().

like image 75
Brad Ackerman Avatar answered Oct 04 '22 22:10

Brad Ackerman


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.

like image 27
Matthew Flaschen Avatar answered Oct 04 '22 22:10

Matthew Flaschen