@ZeroGeek
2015-07-23T07:32:51.000000Z
字数 1052
阅读 711
未分类
注:粗体文字为不理解的地方
This is usually where you should commit any changes that should be persisted beyond the current user session (because the user might not come back).
(The android:name attribute is the only required attribute—it specifies the class name of the activity.
android:name属性必须被设置,来指定activity的名字)
Once you publish your application, you should not change this name, because if you do, you might break some functionality, such as application shortcuts (read the blog post, Things That Cannot Change).
However, your application might also want to perform some action, such as send an email, text message, or status update, using data from your activity. In this case, your application might not have its own activities to perform such actions, so you can instead leverage the activities provided by other applications on the device, which can perform the actions for you.
Because this state can transition often, the code in these two methods should be fairly lightweight in order to avoid slow transitions that make the user wait.