Friday, April 18, 2014

What is the use MainAcitity


For example, when I created the project, I named UserActivity he will be automatically generated in the project in a Mainactivity
But I usually use their own UserActivity calls are deleted MainAcitity matter?
Otherwise, what is the specific use of it
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Deletion no problem
A multiple Activity Application is relatively independent
When the project is generated automatically generate a trouble free MainActivity yourself and then re-established
Reply:
You can delete, you can choose when you create a project does not create Activity, if you choose, then you can directly MainActivity change you want UserActivity, do not re-create
Reply:
Can be deleted, it is just the name of the system default Activity generated, what was the name can be.
Reply:
If you need to interface to show the App, then there must be an Activity as the main interface (there are other Activity), just like we usually write PC desktop programs have a MainForm as; If your App provides service only words (such as monitoring such and such a process and then make the appropriate treatment), that service can be configured to start automatically in the configuration file, this situation can no Activity. Therefore, for an Android App, Activity is not necessary.
Reply:
MainActivity is the default when you add a new project to start Activity, when you choose to use your own Acitivy, you only need to modify AndroidManifest.xml there can be.
As long as you can guarantee when you start there Acitivity loaded on it, MainAcitivity be deleted.

No comments:

Post a Comment