First, create Android Project
In the New dialog box, enter the APP attribute, and the SDK version is all up to date, not version compatible. Theme Select Holo Dark.
Next, use the default settings
Next, use the default settings
Next, use the default configuration
Next, use the default settings
Create an initial screen after completion
In the previous steps, we chose to create the Mainactivity,adt to help us generate the Mainactivity.java file in the SRC directory, generate the Activity_main.xml file in the res/layout/directory, and open the edit window , as shown above, is the UI interface definition file, which is a standard XML file that is depicted by an editor parsing an XML file. Click on the "Graphical Layout" and "activity_main.xml" below to switch between the graphics editor and the XML text editor.
To make the project structure clear, we create a new package that is dedicated to activity:
Package name is Ui.activity
Here, change the Package Explorer display mode to hierarchical
Drag Mainactivity.java to the ui.activity package, pop Up the update dialog box, and select OK.
As the location of the activity is changed, we need to update the Androidmanifest.xml and correct the application configuration.
The following figure, double hit open androidmanifest.xml, select Application tab, select the Mainactivity in Application Nodes, the right Name property is wrong, click Browse to select again, set as: Co M.lingsmm.purelunarcalendar.ui.acivity
Continue to pull down and set the screen orientation to "sensorlandscape", which means that it is horizontal and that the direction of gravity is adjusted.
Above the interface editing window is the toolbar:
1: Multiple screen preview, if your program to be compatible with a variety of sizes of devices, you can select this.
2: The main screen Size setting (our application, not compatible, only for Google Nexus 7, this option is Nexus 7, to 10 "screen editing layout)
3: Screen direction, we choose horizontal screen
4: The subject
5: The associated Java class, and the context instance is created by it.
6: Multi-lingual support.
7: System version selection, if compatible with multiple versions, you can select a different version of the preview.