Lesson one-building your first Android App

Source: Internet
Author: User

This lesson achieves three purposes by creating an Android app program:

First: Let us know how to create an Android app in Eclipse.

Second: Learn the importance of packages in Android apps.

Third: Understand the role of the Android Minimum SDK version.

This program does not even need to write a line of code, it can be fully automated to create a good.

Step 1 Open Eclipse, select menu file->new->and-roid Application Project, as shown in Create Android program interface.

Enter the name of the app in the Application Name text box, enter the project name in the Project Name text box, enter the package name in the Packages Name text box, which is a very important package name that is unique to the Android app and can only have one per phone. The same name will be overwritten. We generally use the full English lowercase in the package name, the words are separated by dots, such as: Xxx.xxx.xxx. Select the project target SDK version in the Build SDK drop-down list and select the Minimum SDK version required for the project in the Minimum Required SDK drop-down list, which is the minimum SDK version supported by our application, with a phone below this version, You will not be able to install this application.



---------------------------------------------

Step 2 After clicking the Next button, the interface shown below is basically not modified, whether you want to create an application icon, whether to create an activity (a control class to load the interface)

Note If the project is a library for other projects, you should tick the mark this project as a library, not the vault.


----------------------------------------------------------------------------------------


Step 3 after clicking the Next button, the displayed interface as shown, the user can define the icon that the app displays. Image selects the background image; Clipart selects the system's transduction; text. Trim surrounding Blank space option sets whether the foreground map is automatically filled with the background map, Additional padding sets the display scale of the foreground and background plots, Foreground scaling sets the size of the background, crop is stretched, Center is centered; shape sets the form of the background map, none sets the background to null, square is a rectangular background, circle is set to a circular background, and backgroud color and foreground color set the background and foreground color of the display icon respectively.


------------------------------------------------------------------------------

Step 4 after clicking the Next button, enter the interface as shown. Select how activity is displayed: Blankactivity creates an empty acitivity, which is similar to the traditional way of creating, Masterdetailflow will create a program with "fragmentation" that can reuse larger screens.


---------------------------------------------


Step 5 Click the Next button, fill in the activity information, enter the interface shown. Enter the name of the acitivity in the Activity Name text box and enter its corresponding layout name (that is, a user interface) in the Layout Name text box.


--------------------------------------------


Step 6 Click the Finish button to complete the project creation and enter the layout editing interface shown.


-----------------------------------


Step 7 Run the item for now, you need to make some settings, right-click the project, and in the shortcut menu that pops up, clicking Run As->run Android application.


Step 8 shows the interface that the AVD is loading, and the emulator starts.


This article is from "Feather android" blog, please make sure to keep this source http://caifly.blog.51cto.com/3433287/1560610

Lesson one-building your first Android App

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.