Android calendar development tutorial

Source: Internet
Author: User

1. Create an Android Project

In the create dialog box, enter the App attributes. Select the latest SDK version, which is not compatible with the version. Select Holo Dark as the topic.

Next, use the default settings

Next, use the default settings

Next, use the default configuration

Next, use the default settings

Initial screen after creation

In the above step, we chose to create MainActivity, and ADT helped us generate MainActivity under the src directory. java file. The activity_main.xml file is generated in the res/layout/directory and opened in the editing window. For example, it is a UI definition file, which is a standard xml file, the displayed image is depicted in the xml file parsed by the editor. Click "Graphical Layout" and "activity_main.xml" below to switch between the graphic editing and xml text editor.

To make the project structure clear, we create a new package for activity:

Set the package name to ui. activity.

Change the display mode of Package Explorer to Hierarchical.

Drag MainActivity. java to the ui. activity package. The update dialog box is displayed. Select OK.

Because the location of the activity is changed, we need to update AndroidManifest. xml to correct the Application configuration.

For example, double-click AndroidManifest. xml: select the Application tab, and select MainActivity in Application Nodes. The Name attribute on the right is incorrect. Click Browse to reselect and set it to com. lingsmm. purelunarcalendar. ui. acivity

Continue to the drop-down list and set Screen orientation to "sensorLandscape", indicating that the Screen direction is horizontal and the gravity direction is adjusted.

At the top of the page editing window is the toolbar:

1: multi-screen preview. If your program is compatible with devices of multiple sizes, you can select this option.

2: set the size of the main screen (our application is incompatible, only for google Nexus 7, select Nexus 7, and edit the layout on the 10 screen)

3: screen direction. Select landscape

4: Subject

5: The associated Java class, which is created by the Context instance.

6: multi-language support.

7. Select a system version. If multiple versions are compatible, you can select different versions for 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: 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.