Could you explain how to create and link?

I was looking for him and I just can't wrap myself around onCreate and Bundles. I understand that onCreate is called when the program starts, but how the Bundles are passed and how they are appropriate. Can someone try to put this in plain English, because I cannot find it well described.

thanks

+6
android oncreate bundle
source share
1 answer

Bundle in the onCreate method must contain the state of your activity before it is killed.

A simple example, when you change the orientation of your device, your activity is recreated. Imagine that the user fills out a long form and he / she accidentally changes orientation. When the application is restarted, all entered data will be lost if you do not save this information. One possibility is to use the package.

If you want to know how to use it, I would recommend that you read this question.

+13
source share

All Articles