Develop the Android Calendar tutorial

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.