How createa new activity

Creating a new activity

For create a new activity into a exist project follow the next steps.

Step 1.  Create a Empty activity

Select the layout folder, select "New", next select "Activity", next select "Empty Activity". 

This action will be create all necesary for work on a new activity.





This will do next:


  • Add  the activity into AndroidManifest.
  • Create a new class for activity
  • Create a new activity layout


Important:

It don't will create an event for you activity, for do it you need create an event for use the activity.



Step 1.  Set name for activity


You will see this windows after create a new activity. You have to set activity name and the other fields are optionals.


Step 2.  Use

The activity will be crated and you can use it.





Comments

Popular posts from this blog

Retriving Android API version by code

Add image from URL